Changes

no edit summary
Line 160: Line 160:  
end
 
end
 
end
 
end
 +
return nil
 
end
 
end
   Line 166: Line 167:  
return #self._equipment
 
return #self._equipment
 
end
 
end
 +
return nil
 
end
 
end
    
function ShipData:total_space()
 
function ShipData:total_space()
 +
if not self._equipment then
 +
return nil
 +
end
 
local total_space = 0
 
local total_space = 0
 
local size
 
local size
Line 197: Line 202:  
ship._class = ShipClass(ship._class)
 
ship._class = ShipClass(ship._class)
 
end
 
end
if not ship._equipment then
+
if ship._equipment then
ship._equipment = {}
+
for _, slot in ipairs(ship._equipment) do
end
+
if slot.equipment then
for _, slot in ipairs(ship._equipment) do
+
slot.equipment = Equipment(slot.equipment)
if slot.equipment then
+
end
slot.equipment = Equipment(slot.equipment)
   
end
 
end
 
end
 
end
Anonymous user