Anonymous

Module:GameData: Difference between revisions

From Melvor Idle
Update to handle multiple source data pages
(getEntities: Further fixes)
(Update to handle multiple source data pages)
Line 4: Line 4:
local p = {}
local p = {}


local GameData = mw.loadData('Module:GameData/data')
local GameData1 = mw.loadData('Module:GameData/data')
local GameData2 = mw.loadData('Module:GameData/data2')
-- Combine data into a single object
local GameData = {}
for _, data in ipairs({GameData1, GameData2}) do
for entityType, entityData in pairs(data) do
GameData[entityType] = entityData
end
end
 
local indexCache = {}
local indexCache = {}