• 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 9: Line 10:  
local EnemyShipListKai = BaseTable{
 
local EnemyShipListKai = BaseTable{
 
_header_template = [[! style="width: 100px;" | Card
 
_header_template = [[! style="width: 100px;" | Card
! style="width: 75px;" | Name
+
! style="min-width: 75px;" | Name
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: pink;" | ${hp}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: pink;" | ${hp}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightcoral;" | ${firepower}
 
! style="width: 30px; text-align: center; vertical-align: middle; background-color: lightcoral;" | ${firepower}
Line 33: Line 34:  
},
 
},
 
_column_cell_templates = {
 
_column_cell_templates = {
card = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px; background-color: ${bg_color};" |${value}]],
+
card = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px; background-color: ${bg_color};${extra_style}" |${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 52: Line 53:  
function EnemyShipListKai:card(ship)
 
function EnemyShipListKai:card(ship)
 
local value
 
local value
 +
local bg_color, extra_style = EnemyColors.rarity_colors(ship)
 
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 57: Line 59:  
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 = self._transparent, text_align = self._center_align}
+
return {value = value, bg_color = bg_color, extra_style = extra_style, text_align = self._center_align}
 
end
 
end
  
Anonymous user

Navigation menu