Module:OrdersData/Data: Difference between revisions

From Against the Storm Official Wiki
Created page with "--region Dependencies local JsonUtils = require("Module:JsonUtils") local newData = JsonUtils.convertJSONToLuaTable(DATA_FILE) --Promote the ID to be the key of the main data table. ordersData = {} for _, order in ipairs(newData) do ordersData[order[SCHEMA.ID]] = order end return ordersData"
 
No edit summary
Line 2: Line 2:


local JsonUtils = require("Module:JsonUtils")
local JsonUtils = require("Module:JsonUtils")
local DATA_FILE = "Module:OrdersData/Orders.json"


local newData = JsonUtils.convertJSONToLuaTable(DATA_FILE)
local newData = JsonUtils.convertJSONToLuaTable(DATA_FILE)

Revision as of 08:20, 31 August 2025

Documentation for this module may be created at Module:OrdersData/Data/doc

--region Dependencies

local JsonUtils = require("Module:JsonUtils")
local DATA_FILE = "Module:OrdersData/Orders.json"

local newData = JsonUtils.convertJSONToLuaTable(DATA_FILE)

--Promote the ID to be the key of the main data table.
ordersData = {}
for _, order in ipairs(newData) do
    ordersData[order[SCHEMA.ID]] = order
end

return ordersData