forked from Muscipular/cgmsv-lua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
37 lines (37 loc) · 1.15 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
_HookVer = '0.2.31'
_HookFunc = false;
_GMVS_ = nil;
if NL.Version == nil or NL.Version() < 20230511 then
if getHookVer == nil then
error(string.format('[ERR]HOOK not load %s', _HookVer))
end
if getHookVer() ~= _HookVer then
error(string.format('[ERR]HOOK not match require %s, but found %s', _HookVer, getHookVer()));
end
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print(string.format("[LUA]HOOK loaded %s, start load lua ........", _HookVer))
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>")
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>")
_HookFunc = true;
else
_GMVS_ = NL.Version();
end
print("[LUA]Initial Lua System......")
collectgarbage()
collectgarbage('stop')
math.randomseed(os.time())
dofile('lua/Const.lua')
dofile('lua/Util.lua')
dofile('lua/libs/GmsvExtension.lua')
dofile('lua/libs/ModuleSystem.lua')
collectgarbage('restart')
collectgarbage()
print("[LUA]Initial Lua System done.")
dofile('lua/ModuleConfig.lua')
pcall(dofile, 'lua/Modules/Private/Config.lua')
if _HookFunc then
NL.EmitInit()
end