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