- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Changes
Jump to navigation
Jump to search
Line 211:
Line 211:
+
+
+
Line 255:
Line 258:
− end
− if ship._equipment then
− for _, slot in ipairs(ship._equipment) do
− if slot.equipment then
− slot.equipment = Equipment(slot.equipment)
− end
− end
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)