Changes

Undo revision 974961 by Tsubakura (talk)
Line 19: Line 19:  
! 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="text-align: center; vertical-align: middle;" | Armament]],
+
! style="text-align: center; vertical-align: middle;" | Armament
 +
! style="text-align:left;" | Notes]],
 
_columns = {
 
_columns = {
 
"card",
 
"card",
Line 31: Line 32:  
"armor",
 
"armor",
 
"evasion",
 
"evasion",
"armament"
+
"armament",
 +
"notes",
 
},
 
},
_cell = [[| style="text-align: ${text_align}; background-color: ${bg_color};" |${value}]],
+
_cell = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px; background-color: ${bg_color};" |${value}]],
 
_column_cell_templates = {
 
_column_cell_templates = {
 
card = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px;}]],
 
card = [[| style="text-align: ${text_align}; padding:5px 5px 5px 5px;}]],
Line 64: Line 66:  
function EnemyShipListKai:card(ship)
 
function EnemyShipListKai:card(ship)
 
local value
 
local value
 +
local bg_color, background_image = EnemyColors:rarity_colors(ship)
 +
background_image = EnemyColors:variant_background_image(ship, background_image)
 
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 69: Line 73:  
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 or self._none, text_align = self._center_align}
+
return {value = value, bg_color = bg_color, background_image = background_image or self._none, text_align = self._center_align}
 
end
 
end
  
cssedit, prechecked
1,656

edits