mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-11 23:54:52 +09:00
Fixed inconsistent moduleName
This commit is contained in:
1 parent
cd4b06a996
commit
97b00a3a1b
2 files changed
+3
-3
No files matched your search
@@ -281,7 +281,7 @@ function Server._thread:create(obj)
|
||||
obj._env._ENV = nil -- provents infinte recusion
|
||||
-- removes any modules from the _env to save space in global (less time to serizle)
|
||||
obj._env._modules = {}
|
||||
for name,value in pairs(obj._env) do if is_type(value,'table') and value._module_name and loaded_modules[value._module_name] == value then obj._env._modules[name] = value._module_name obj._env[name] = nil end end
|
||||
for name,value in pairs(obj._env) do if is_type(value,'table') and value._moduleName and loaded_modules[value._moduleName] == value then obj._env._modules[name] = value._moduleName obj._env[name] = nil end end
|
||||
setmetatable(obj._env,_env_metatable)
|
||||
local name = obj.name or 'Anon'
|
||||
verbose('Created new thread: '..name..' ('..obj.uuid..')')
|
||||
|
||||
@@ -5,9 +5,9 @@ local Game = { --luacheck: allow defined top
|
||||
VALID_FILTER = function(v)
|
||||
return v and v.valid
|
||||
end,
|
||||
_protect = function(module_name)
|
||||
_protect = function(moduleName)
|
||||
return {
|
||||
__newindex = function() error("Attempt to mutatate read-only "..module_name.." Module") end,
|
||||
__newindex = function() error("Attempt to mutatate read-only "..moduleName.." Module") end,
|
||||
__metatable = true
|
||||
}
|
||||
end,
|
||||
|
||||
Reference in new issue
Block a user