Changes

no edit summary
Line 10: Line 10:     
function Equipment:create(name)
 
function Equipment:create(name)
if equipments[name] then
+
if name == nil then
 +
return EquipmentData()
 +
elseif equipments[name] then
 
return equipments[name]
 
return equipments[name]
 
else
 
else
 
local equipment_table = require(mw.ustring.format('Module:%s', name))
 
local equipment_table = require(mw.ustring.format('Module:%s', name))
local equipment = EquipmentData:create(equipment_table)
+
local equipment = EquipmentData(equipment_table)
 
equipments[name] = equipment
 
equipments[name] = equipment
 
return equipment
 
return equipment
Anonymous user