Changes

no edit summary
Line 154: Line 154:     
function ShipData:slot(slot)
 
function ShipData:slot(slot)
local equipment_slot = self._equipment[slot]
+
if self._equipment then
return equipment_slot.equipment, equipment_slot.size
+
local equipment_slot = self._equipment[slot]
 +
if equipment_slot then
 +
return equipment_slot.equipment, equipment_slot.size
 +
end
 +
end
 
end
 
end
    
function ShipData:slots()
 
function ShipData:slots()
return #self._equipment
+
if self._equipment then
 +
return #self._equipment
 +
end
 
end
 
end
  
Anonymous user