Final update

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-01-06 16:20:55 +07:00
parent 869135a10c
commit 766b32b1b4
8 changed files with 24 additions and 14 deletions

View File

@@ -182,7 +182,7 @@ local function _executeMod(P)
if not GAME.modCodeList[P.id] then GAME.modCodeList[P.id]={} end
if not GAME.applyModTask then
function GAME.ApplyModsTask()
function GAME.applyModsTask()
while GAME.playing do
for _,p in pairs(GAME.modCodeList) do
for _,c in pairs(p) do pcall(c) end
@@ -190,12 +190,12 @@ local function _executeMod(P)
coroutine.yield()
end
-- Kill mod patching function when game stopped
TASK.removeTask_code(GAME.ApplyModsTask)
TABLE.cut(GAME.modCodeList)
TABLE.clear(GAME.modCodeList)
TASK.removeTask_code(GAME.applyModsTask)
GAME.modCodeList=nil
GAME.ApplyModsTask=nil
GAME.applyModsTask=nil
end
TASK.new(GAME.ApplyModsTask)
TASK.new(GAME.applyModsTask)
end
end