• 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 BaseTable = require('Module:BaseTable')
 
local BaseTable = require('Module:BaseTable')
local EnemyColors = require('Module:EnemyColors')
   
local EnemyShip = require('Module:EnemyShip')
 
local EnemyShip = require('Module:EnemyShip')
 
local Formatting = require('Module:Formatting')
 
local Formatting = require('Module:Formatting')
Line 19: Line 18:  
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #F2E279;" | ${armor}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: #F2E279;" | ${armor}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: violet;" | ${evasion}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: violet;" | ${evasion}
! style="min-width: 250px; text-align: center; vertical-align: middle;" | Equipment
+
! style="text-align: center; vertical-align: middle;" | Equipment
 
! style="text-align:left;" | Notes]],
 
! style="text-align:left;" | Notes]],
 
_columns = {
 
_columns = {
Line 36: Line 35:  
},
 
},
 
_column_cell_templates = {
 
_column_cell_templates = {
card = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px; background-color: ${bg_color};${extra_style}" |${value}]],
+
card = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px; background-color: ${bg_color};" |${value}]],
 
},
 
},
 
_cell = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px;" |${value}]],
 
_cell = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px;" |${value}]],
Line 45: Line 44:     
function EnemyShipListKai:name(ship)
 
function EnemyShipListKai:name(ship)
local link, text, section = ship:link()
+
local name = ship:name()
local value = {Formatting:format_link(link, text, section)}
+
local value = {name}
 
local japanese_name = ship:japanese_name()
 
local japanese_name = ship:japanese_name()
if japanese_name and (text or link) ~= japanese_name then
+
if japanese_name and name ~= japanese_name then
table.insert(value, Formatting:format_stat(ship:japanese_name()))
+
table.insert(value, Formatting:format_stat(japanese_name))
 
end
 
end
 
return {value = Formatting:id_span(tostring(ship:api_id() or mw.ustring.lower(mw.ustring.gsub(ship:name(), "%s+"))), self._fragment_prefix, table.concat(value, "<br />")), text_align = self._start_align}
 
return {value = Formatting:id_span(tostring(ship:api_id() or mw.ustring.lower(mw.ustring.gsub(ship:name(), "%s+"))), self._fragment_prefix, table.concat(value, "<br />")), text_align = self._start_align}
Line 56: Line 55:  
function EnemyShipListKai:card(ship)
 
function EnemyShipListKai:card(ship)
 
local value
 
local value
local bg_color, extra_style = EnemyColors:rarity_colors(ship)
+
local bg_color = Formatting:format_ship_back(ship:back())
 
if ship == false then
 
if ship == false then
 
value = Formatting:format_image{self._blank, size = self._size}
 
value = Formatting:format_image{self._blank, size = self._size}
Line 62: Line 61:  
value = ShipBattleCardKai:get{ship = ship, size = self._size, link = ship:link(), caption = ship:name()}
 
value = ShipBattleCardKai:get{ship = ship, size = self._size, link = ship:link(), caption = ship:name()}
 
end
 
end
return {value = value, bg_color = bg_color, extra_style = extra_style, text_align = self._center_align}
+
return {value = value, bg_color = bg_color, text_align = self._center_align}
 
end
 
end
   Line 117: Line 116:  
table.insert(icons, icon)
 
table.insert(icons, icon)
 
end
 
end
return {value = table.concat(icons, " "), text_align = self._center_align}
+
return {value = table.concat(icons), text_align = self._start_align}
 
end
 
end
  
Anonymous user

Navigation menu