Changes
load Equipment lazily (on slot() access)
local equipment_slot = self._equipment[slot]
local equipment_slot = self._equipment[slot]
if equipment_slot then
if equipment_slot then
if type(equipment_slot.equipment) == "string" then
equipment_slot.equipment = Equipment(equipment_slot.equipment)
end
return equipment_slot.equipment, equipment_slot.size
return equipment_slot.equipment, equipment_slot.size
end
end
if ship._class then
if ship._class then
ship._class = ShipClass(ship._class)
ship._class = ShipClass(ship._class)
end
end
setmetatable(ship, ship)
setmetatable(ship, ship)