Changes
no edit summary
local BaseTable = require('Module:BaseTable')
local BaseTable = require('Module:BaseTable')
local EnemyShip = require('Module:EnemyShip')
local EnemyShip = require('Module:EnemyShip')
local Formatting = require('Module:Formatting')
local Formatting = require('Module:Formatting')
! 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 = {
},
},
_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}]],
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}
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}
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
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