• 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 232: Line 232:  
end
 
end
   −
function ShipData:space(slot, raw)
+
function ShipData:equipment_rarity(slot, raw)
 +
local equipment_slot = self._equipment[slot]
 +
if not equipment_slot then
 +
return not raw and "" or nil
 +
end
 +
local equipment = equipment_slot["equipment"]
 +
if raw then
 +
return equipment:rarity(raw)
 +
elseif equipment == nil then
 +
return "??"
 +
elseif equipment == false then
 +
return "Unequipped"
 +
else
 +
return equipment:rarity()
 +
end
 +
end
 +
 
 +
function ShipData:equipment_back(slot)
 +
local equipment_slot = self._equipment[slot]
 +
if not equipment_slot then
 +
return 0
 +
end
 +
local equipment = equipment_slot["equipment"]
 +
if not equipment then
 +
return 0
 +
else
 +
return equipment:back()
 +
end
 +
end
 +
 
 +
function ShipData:slot_size(slot, raw)
 
local equipment_slot = self._equipment[slot]
 
local equipment_slot = self._equipment[slot]
 
if not equipment_slot then
 
if not equipment_slot then
 
return not raw and "-" or nil
 
return not raw and "-" or nil
 
end
 
end
local space = equipment_slot["space"]
+
local slot_size = equipment_slot["size"]
if space == nil then
+
if slot_size == nil then
 
return "??"
 
return "??"
elseif space == false then
+
elseif slot_size == false then
 
return "-"
 
return "-"
 
else
 
else
return space
+
return slot_size
 
end
 
end
 
end
 
end
Line 305: Line 335:  
ShipData.format_type = ShipData:create_formatter({
 
ShipData.format_type = ShipData:create_formatter({
 
[0] = "??",
 
[0] = "??",
[1] = "Coastal Defence ShipData",
+
[1] = "Coastal Defence Ship",
 
[2] = "Destroyer",
 
[2] = "Destroyer",
 
[3] = "Light Cruiser",
 
[3] = "Light Cruiser",
Anonymous user

Navigation menu