mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-05 13:53:54 -04:00
Small fixes
This commit is contained in:
parent
f7a394f057
commit
6ddb28ffbc
10 changed files with 85 additions and 71 deletions
|
@ -10,8 +10,6 @@ function Assemblage.new(assemble)
|
||||||
__isAssemblage = true,
|
__isAssemblage = true,
|
||||||
}, Assemblage)
|
}, Assemblage)
|
||||||
|
|
||||||
Assemblage.__mt = {__index = assemblage}
|
|
||||||
|
|
||||||
return assemblage
|
return assemblage
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -22,5 +20,7 @@ function Assemblage:assemble(e, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Assemblage, {
|
return setmetatable(Assemblage, {
|
||||||
__call = function(_, ...) return Assemblage.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Assemblage.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -33,5 +33,7 @@ function Component:__initialize(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Component, {
|
return setmetatable(Component, {
|
||||||
__call = function(_, ...) return Component.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Component.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -136,5 +136,7 @@ function Entity:has(component)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Entity, {
|
return setmetatable(Entity, {
|
||||||
__call = function(_, ...) return Entity.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Entity.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -61,9 +61,11 @@ function Concord.init(settings)
|
||||||
error("bad argument #1 to 'Concord.addInstance' (Instance expected, got "..type(instance)..")", 2)
|
error("bad argument #1 to 'Concord.addInstance' (Instance expected, got "..type(instance)..")", 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i, instance in ipairs(Concord.instances) do
|
for i, _instance in ipairs(Concord.instances) do
|
||||||
table.remove(Concord.instances, i)
|
if (instance == _instance) then
|
||||||
break
|
table.remove(Concord.instances, i)
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -282,5 +282,7 @@ function Instance:onEntityRemoved(e) -- luacheck: ignore
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(Instance, {
|
return setmetatable(Instance, {
|
||||||
__call = function(_, ...) return Instance.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Instance.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -77,5 +77,7 @@ function List:has(obj)
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(List, {
|
return setmetatable(List, {
|
||||||
__call = function() return List.new() end,
|
__call = function()
|
||||||
|
return List.new()
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -46,5 +46,7 @@ end
|
||||||
|
|
||||||
return setmetatable(Pool, {
|
return setmetatable(Pool, {
|
||||||
__index = List,
|
__index = List,
|
||||||
__call = function(_, ...) return Pool.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return Pool.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -156,5 +156,7 @@ function System:disabledCallback(callbackName) -- luacheck: ignore
|
||||||
end
|
end
|
||||||
|
|
||||||
return setmetatable(System, {
|
return setmetatable(System, {
|
||||||
__call = function(_, ...) return System.new(...) end,
|
__call = function(_, ...)
|
||||||
|
return System.new(...)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue