2026-06-06 12:35:31 +02:00
|
|
|
local ecs = require("tiny-ecs")
|
|
|
|
|
|
|
|
|
|
ecs.init = function()
|
2026-06-10 22:58:48 +02:00
|
|
|
print("[i] loading ecs")
|
|
|
|
|
baseEntify = ecs.processingSystem()
|
|
|
|
|
baseEntify.filter = ecs.rejectAll('commit')
|
|
|
|
|
baseEntify.updatethread = true
|
|
|
|
|
function baseEntify:onAdd(obj)
|
2026-06-11 14:01:26 +02:00
|
|
|
obj.commit = api.util.commit( api.world, obj, api )
|
2026-06-10 22:58:48 +02:00
|
|
|
end
|
|
|
|
|
ecs.addSystem( api.world, baseEntify )
|
2026-06-06 12:35:31 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return ecs
|