• 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 9: Line 9:     
local EnemyShipListKai = BaseTable{
 
local EnemyShipListKai = BaseTable{
_header_template = [[! style="width: 100px;" | Card
+
_header_template = [[! style="min-width: 180px;" | Card
 
! style="min-width: 75px;" | Name
 
! style="min-width: 75px;" | Name
 +
! Type
 
! 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 18: 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="width: 250px; text-align: center; vertical-align: middle;" | Equipment
+
! style="min-width: 250px; text-align: center; vertical-align: middle;" | Equipment
 
! style="text-align:left;" | Notes]],
 
! style="text-align:left;" | Notes]],
 
_columns = {
 
_columns = {
 
"card",
 
"card",
 
"name",
 
"name",
 +
"type",
 
"hp",
 
"hp",
 
"firepower",
 
"firepower",
Line 39: Line 41:  
_item_class = function(item_key) return EnemyShip(item_key) end,
 
_item_class = function(item_key) return EnemyShip(item_key) end,
 
_fragment_prefix = "enemyshiplistkai",
 
_fragment_prefix = "enemyshiplistkai",
 +
_icon_caption_template = "${equipment} ${equipment_type}",
 
}
 
}
   Line 95: Line 98:     
function EnemyShipListKai:equipment(ship)
 
function EnemyShipListKai:equipment(ship)
return {}
+
local icons = {}
 +
for i = 1, ship:slots_length() do
 +
local equipment, size, estimation, icon, equipment_type, equipment_link = ship:slot(i)
 +
if equipment then
 +
icon = equipment:icon()
 +
equipment_type = equipment:type()
 +
equipment_link, equipment = Formatting:format_link(equipment:link())
 +
equipment = equipment or equipment_link
 +
else
 +
icon = disabled and "" or false
 +
equipment = equipment == false and (disabled and "- Locked -" or "- Unequipped -") or Formatting:format_stat(equipment)
 +
equipment_link = false
 +
equipment_type = false
 +
end
 +
if icon ~= "" then
 +
icon = Formatting:format_image{Formatting:format_equipment_icon(icon), link = equipment_link, caption = format{self._icon_caption_template, equipment_type = Formatting:format_equipment_type(equipment_type), equipment = equipment}}
 +
end
 +
table.insert(icons, icon)
 +
end
 +
return {value = table.concat(icons, " "), text_align = self._center_align}
 
end
 
end
  
Anonymous user

Navigation menu