Module:EquipmentAsset

Revision as of 12:35, 12 May 2021 by Botkaze (talk | contribs) (3 revisions imported)

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

local BaseAsset = require('Module:BaseAsset')
local Equipment = require('Module:Equipment')

local EquipmentAsset = BaseAsset()

function EquipmentAsset:create_object(args)
    if args.id then
        local equipmentMap = mw.loadData('Module:Collection/EquipmentByApiId')
        local apiId = tonumber(args.id)
        return Equipment(equipmentMap[apiId])
    else
	    return Equipment(args[1])
    end
end

return EquipmentAsset