Browse Source

Delete register_on_mods_loaded callbacks when not required.

master
luk3yx 3 weeks ago
parent
commit
acecf727e2
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      sscsm_init.lua

+ 2
- 1
sscsm_init.lua View File

@@ -66,12 +66,13 @@ print('Hello from the server-sent CSMs!')
do
local funcs = {}
function sscsm.register_on_mods_loaded(callback)
table.insert(funcs, callback)
if funcs then table.insert(funcs, callback) end
end

function sscsm._done_loading_()
sscsm._done_loading_ = nil
for _, func in ipairs(funcs) do func() end
funcs = nil
end
end


Loading…
Cancel
Save