Anonymous

Module:GameData: Difference between revisions

From Melvor Idle
getEntities: Further fixes
(getEntities: Allow passing of table as entityType, and relax checks on data)
(getEntities: Further fixes)
Line 158: Line 158:
         entData = entityType
         entData = entityType
     end
     end
local entData = GameData[entityType]
if entData == nil and type(entityType) == 'string' then
if entData == nil then
error('No such entity type: ' .. entityType, 2)
error('No such entity type: ' .. entityType, 2)
elseif type(entData) ~= 'table' then
elseif type(entData) ~= 'table' then