• 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 Equipment = require('Module:Equipment')
 +
local Formatting = require('Module:Formatting')
 
local ShipClass = require('Module:ShipClass')
 
local ShipClass = require('Module:ShipClass')
   Line 7: Line 8:  
function ShipData:name()
 
function ShipData:name()
 
if self._suffix then
 
if self._suffix then
return self:base_name() .. " " .. self._suffix
+
return self:base_name() .. " " .. (self._display_suffix or self:suffix())
 
else
 
else
 
return self:base_name()
 
return self:base_name()
Line 15: Line 16:  
function ShipData:base_name()
 
function ShipData:base_name()
 
return self._name
 
return self._name
 +
end
 +
 +
function ShipData:suffix()
 +
return self._suffix
 
end
 
end
   Line 20: Line 25:  
if self._page then
 
if self._page then
 
return self._page, self:name()
 
return self._page, self:name()
elseif self._suffix then
+
elseif self:suffix() then
 
return self:base_name(), self:name()
 
return self:base_name(), self:name()
 
else
 
else
Line 53: Line 58:  
function ShipData:id()
 
function ShipData:id()
 
return self._id
 
return self._id
 +
end
 +
 +
function ShipData:api_id()
 +
return self._api_id
 
end
 
end
   Line 80: Line 89:     
function ShipData:card()
 
function ShipData:card()
 +
if self._card then
 +
return self._card
 +
end
 +
api_id = self:api_id()
 +
if api_id then
 +
return Formatting:ship_card(api_id, self:name(), self:suffix(), self:type(), self._card_extension)
 +
end
 
return self._card
 
return self._card
 +
end
 +
 +
function ShipData:card_damaged()
 +
if self._card_damaged then
 +
return self._card_damaged
 +
end
 +
api_id = self:api_id()
 +
if api_id then
 +
return Formatting:ship_card_damaged(api_id, self:name(), self:suffix(), self:type(), self._card_damaged_extension)
 +
end
 +
return self._card_damaged
 
end
 
end
    
function ShipData:battle_card()
 
function ShipData:battle_card()
 +
if self._battle_card then
 +
return self._battle_card
 +
end
 +
api_id = self:api_id()
 +
if api_id then
 +
return Formatting:ship_battle_card(api_id, self:name(), self:suffix(), self:type(), self._battle_card_extension)
 +
end
 
return self._battle_card
 
return self._battle_card
 +
end
 +
 +
function ShipData:battle_card_damaged()
 +
if self._battle_card_damaged then
 +
return self._battle_card_damaged
 +
end
 +
api_id = self:api_id()
 +
if api_id then
 +
return Formatting:ship_battle_card_damaged(api_id, self:name(), self:suffix(), self:type(), self._battle_card_damaged_extension)
 +
end
 +
return self._battle_card_damaged
 +
end
 +
 +
function ShipData:cg()
 +
if self._cg then
 +
return self._cg
 +
end
 +
api_id = self:api_id()
 +
if api_id then
 +
return Formatting:ship_cg(api_id, self:name(), self:suffix(), self:type(), self._cg_extension)
 +
end
 +
return self._cg
 +
end
 +
 +
function ShipData:cg_damaged()
 +
if self._cg_damaged then
 +
return self._cg_damaged
 +
end
 +
api_id = self:api_id()
 +
if api_id then
 +
return Formatting:ship_cg_damaged(api_id, self:name(), self:suffix(), self:type(), self._cg_damaged_extension)
 +
end
 +
return self._cg_damaged
 
end
 
end
  
Anonymous user

Navigation menu