Make source pass luacheck. Remove tiny.getSystemIndex().

This commit is contained in:
Calvin Rose 2016-07-05 17:13:47 -04:00
parent 5997f949cd
commit d94b178670

View File

@ -41,7 +41,6 @@ local tiny_addSystem
local tiny_add local tiny_add
local tiny_removeEntity local tiny_removeEntity
local tiny_removeSystem local tiny_removeSystem
local tiny_remove
--- Filter functions. --- Filter functions.
-- A Filter is a function that selects which Entities apply to a System. -- A Filter is a function that selects which Entities apply to a System.
@ -330,7 +329,7 @@ local function processingSystemUpdate(system, dt)
end end
-- Sorts Systems by a function system.sortDelegate(entity1, entity2) on modify. -- Sorts Systems by a function system.sortDelegate(entity1, entity2) on modify.
local function sortedSystemOnModify(system, dt) local function sortedSystemOnModify(system)
local entities = system.entities local entities = system.entities
local indices = system.indices local indices = system.indices
local sortDelegate = system.sortDelegate local sortDelegate = system.sortDelegate
@ -529,7 +528,6 @@ function tiny.remove(world, ...)
end end
return ... return ...
end end
tiny_remove = tiny.remove
-- Adds and removes Systems that have been marked from the World. -- Adds and removes Systems that have been marked from the World.
function tiny_manageSystems(world) function tiny_manageSystems(world)
@ -863,12 +861,6 @@ function tiny.getSystemCount(world)
return #(world.systems) return #(world.systems)
end end
--- Gets the index of the System in the World.
-- A simpler alternative is `system.index`.
function tiny.getSystemIndex(world, system)
return system.index
end
--- Sets the index of a System in the World, and returns the old index. Changes --- Sets the index of a System in the World, and returns the old index. Changes
-- the order in which they Systems processed, because lower indexed Systems are -- the order in which they Systems processed, because lower indexed Systems are
-- processed first. Returns the old system.index. -- processed first. Returns the old system.index.
@ -905,10 +897,9 @@ worldMetaTable = {
clearSystems = tiny.clearSystems, clearSystems = tiny.clearSystems,
getEntityCount = tiny.getEntityCount, getEntityCount = tiny.getEntityCount,
getSystemCount = tiny.getSystemCount, getSystemCount = tiny.getSystemCount,
getSystemIndex = tiny.getSystemIndex,
setSystemIndex = tiny.setSystemIndex setSystemIndex = tiny.setSystemIndex
}, },
__tostring = function(self) __tostring = function()
return "<tiny-ecs_World>" return "<tiny-ecs_World>"
end end
} }