14 lines
377 B
Lua
14 lines
377 B
Lua
local ecs = require("tiny-ecs")
|
|
|
|
ecs.init = function()
|
|
print("[i] loading ecs")
|
|
baseEntify = ecs.processingSystem()
|
|
baseEntify.filter = ecs.rejectAll('commit')
|
|
baseEntify.updatethread = true
|
|
function baseEntify:onAdd(obj)
|
|
obj.commit = api.util.commit( api.world, api.ecs.requireAll('allowcommit') )
|
|
end
|
|
ecs.addSystem( api.world, baseEntify )
|
|
end
|
|
|
|
return ecs
|