Module:OrdersData/Data

From Against the Storm Official Wiki
Revision as of 08:21, 31 August 2025 by Anteprefix (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 SCHEMA = {
    ID = "id",
    }

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