Module:WorkshopsData2: Difference between revisions

From Against the Storm Official Wiki
m (Created to instantiate a data model instance for workshops data)
m (renamed the return value to be clearer)
 
Line 8: Line 8:




local baseDataModel = BaseDataModel.new(DATA_FILE)
local workshopsDataModel = BaseDataModel.new(DATA_FILE)




-- Return the instance for workshops data, not this module itself!
-- Return the instance for workshops data, not this module itself!
return baseDataModel
return workshopsDataModel

Latest revision as of 15:15, 25 October 2024

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

---@module WorkshopsData
local WorkshopsData = {}


-- Initialize a new instance of the BaseDataModel, configured to load the workshops data
local BaseDataModel = require("Module:BaseDataModel")
local DATA_FILE = "Module:WorkshopsData/Workshops.json"


local workshopsDataModel = BaseDataModel.new(DATA_FILE)


-- Return the instance for workshops data, not this module itself!
return workshopsDataModel