diff --git a/tiny-debug.lua b/tiny-debug.lua index 0b4ef8c..278804b 100644 --- a/tiny-debug.lua +++ b/tiny-debug.lua @@ -48,7 +48,7 @@ function tinyDebug.getEntityAgeMs(entity) if ENTITY_INIT_MS == nil then error("trackEntityAges() has not been enabled!") end - return entity[ENTITY_INIT_MS] + return getCurrentTimeMilliseconds() - entity[ENTITY_INIT_MS] end function tinyDebug.warnWhenNonDataOnEntities() @@ -87,7 +87,7 @@ end function tinyDebug.throwOnUnusedEntities() ---@return boolean - local function entityMatchesASystem(world, entity) + local function entityMatchesSomeSystem(world, entity) local systems = world.systems for i = 1, #systems do local system = systems[i] @@ -106,7 +106,7 @@ function tinyDebug.throwOnUnusedEntities() local el = world.entities for i = 1, #el do - if not entityMatchesASystem(world, el[i]) then + if not entityMatchesSomeSystem(world, el[i]) then unmatchedEntities[#unmatchedEntities + 1] = el[i] end end