mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Fixed index bug for _G modules
This commit is contained in:
@@ -217,7 +217,7 @@ Manager.loadModules = setmetatable({},
|
|||||||
else for key,value in pairs(table.remove(module,1)) do tbl[module_name][key] = value end end
|
else for key,value in pairs(table.remove(module,1)) do tbl[module_name][key] = value end end
|
||||||
end
|
end
|
||||||
-- if there is a module by this name in _G ex table then it will be indexed to the new module
|
-- if there is a module by this name in _G ex table then it will be indexed to the new module
|
||||||
if rawget(_G,module_name) then setmetatable(rawget(_G,module_name),{__index=tbl[module_name]}) end
|
if rawget(_G,module_name) and type(tbl[module_name]) == 'table' then setmetatable(rawget(_G,module_name),{__index=tbl[module_name]}) end
|
||||||
else
|
else
|
||||||
Manager.verbose('Failed load: "'..module_name..'"; Location: '..location..' ('..module..')','errorCaught')
|
Manager.verbose('Failed load: "'..module_name..'"; Location: '..location..' ('..module..')','errorCaught')
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user