• 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
no edit summary
Line 1: Line 1:  +
local Equipment = require('Module:Equipment')
 +
local ShipClass = require('Module:ShipClass')
 +
 
local BaseData = require("Module:BaseData")
 
local BaseData = require("Module:BaseData")
 
local ShipData = BaseData()
 
local ShipData = BaseData()
Line 181: Line 184:  
function ShipData:create(ship)
 
function ShipData:create(ship)
 
ship = ship or {}
 
ship = ship or {}
 +
if ship._class then
 +
ship._class = ShipClass(ship._class)
 +
end
 +
if not ship._equipment then
 +
ship._equipment = {}
 +
end
 +
for _, slot in ipairs(ship._equipment) do
 +
slot.equipment = Equipment(slot.equipment)
 +
end
 
setmetatable(ship, ship)
 
setmetatable(ship, ship)
 
ship.__index = self
 
ship.__index = self
Anonymous user

Navigation menu