Anonymous

Module:GameData: Difference between revisions

From Melvor Idle
Use JSON tables instead of Lua modules to load data
(sortByOrderTable: Protect against errors from unsorted elements)
(Use JSON tables instead of Lua modules to load data)
Line 4: Line 4:
local p = {}
local p = {}


local GameData1 = mw.loadData('Module:GameData/data')
local GameData1 = mw.loadJsonData('Module:GameData/data.json')
local GameData2 = mw.loadData('Module:GameData/data2')
local GameData2 = mw.loadJsonData('Module:GameData/data2.json')
-- Combine data into a single object
-- Combine data into a single object
local GameData = {}
local GameData = {}