Update main.lua
This commit is contained in:
parent
e42f1f006b
commit
fc8a4f4587
30
main.lua
30
main.lua
|
@ -42,23 +42,25 @@ function Main:Init()
|
|||
o.playerServerId = GetPlayerServerId(o.playerId)
|
||||
o:Thread1()
|
||||
else
|
||||
o.ClientImpls = {}
|
||||
for k, v in pairs(Config.EnableModules) do
|
||||
if v then
|
||||
local path = "client/impl/" .. k .. ".impl.lua"
|
||||
local source = LoadResourceFile(ResourceName, path)
|
||||
if source == nil then
|
||||
self:LogWarning("Failed to load %s", path)
|
||||
else
|
||||
--[[ self:LogInfo("Loading %s", path)
|
||||
self:LogInfo("Loaded %s", source) ]]
|
||||
o.ClientImpls[k] = source
|
||||
if Config.ClientLazyLoad then
|
||||
o.ClientImpls = {}
|
||||
for k, v in pairs(Config.EnableModules) do
|
||||
if v then
|
||||
local path = "client/impl/" .. k .. ".impl.lua"
|
||||
local source = LoadResourceFile(ResourceName, path)
|
||||
if source == nil then
|
||||
self:LogWarning("Failed to load %s", path)
|
||||
else
|
||||
--[[ self:LogInfo("Loading %s", path)
|
||||
self:LogInfo("Loaded %s", source) ]]
|
||||
o.ClientImpls[k] = source
|
||||
end
|
||||
end
|
||||
end
|
||||
lib.callback.register(ResourceName .. ":getClientImpl", function(source, implName)
|
||||
return o.ClientImpls[implName]
|
||||
end)
|
||||
end
|
||||
lib.callback.register(ResourceName .. ":getClientImpl", function(source, implName)
|
||||
return o.ClientImpls[implName]
|
||||
end)
|
||||
end
|
||||
o:Exports()
|
||||
o:RegisterCommands()
|
||||
|
|
Loading…
Reference in New Issue
Block a user