refactor GAME.mod (#1006)

Co-authored-by: MrZ_26 <1046101471@qq.com>
This commit is contained in:
Imple Lee
2023-10-08 18:56:44 +08:00
committed by GitHub
parent 323f8a72aa
commit 4e41024ba8
9 changed files with 105 additions and 84 deletions

View File

@@ -199,8 +199,11 @@ local function _loadGameEnv(P)-- Load gameEnv
end
end
if ENV.allowMod then
for _,M in next,GAME.mod do
M.func(P,M.list and M.list[M.sel])
for i=1,#GAME.mod do
if GAME.mod[i]>0 then
local M=MODOPT[i]
M.func(P,M.list and M.list[GAME.mod[i]])
end
end
end
end