• 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
Use ShipCardKai to generate battle cards, flagship icon support
Line 112: Line 112:  
      
 
      
 
     local node, formation = nil, nil
 
     local node, formation = nil, nil
     local fleet = ""
+
     local fleet = {}
 
     local as_rating = 0
 
     local as_rating = 0
 
      
 
      
Line 120: Line 120:  
if item_key == "-" then
 
if item_key == "-" then
 
    if mode == 6 then --We're at a break and have built a full row; time to insert it
 
    if mode == 6 then --We're at a break and have built a full row; time to insert it
        self:insert_item(node, formation, fleet, as_rating, tags)
+
        self:insert_item(node, formation, table.concat(fleet, " "), as_rating, tags)
 
    end
 
    end
 
     
 
     
 
table.insert(self._items, "break")
 
table.insert(self._items, "break")
 
 
fleet, as_rating = "", 0
+
fleet, as_rating = {}, 0
 
tags = {}
 
tags = {}
 
mode = 1
 
mode = 1
Line 184: Line 184:  
        local ship = EnemyShip(ship_name, ship_suffix)
 
        local ship = EnemyShip(ship_name, ship_suffix)
 
         
 
         
        if fleet ~= "" then
+
        table.insert(fleet, ShipCardKai:battle_card{ship = ship, caption = ship:name(), link = ship:base_name(), flagship = #fleet == 0})
            fleet = fleet .. " " -- Actually matters
  −
        end
  −
        fleet = fleet .. Formatting:format_image{ship:battle_card(), caption = ship:name(), link = ship:base_name()}
   
         
 
         
 
        if ship:air_power() then
 
        if ship:air_power() then
Line 196: Line 193:  
     end
 
     end
 
     if mode == 6 then
 
     if mode == 6 then
         self:insert_item(node, formation, fleet, as_rating, tags)
+
         self:insert_item(node, formation, table.concat(fleet, " "), as_rating, tags)
 
     end
 
     end
 
end
 
end
Anonymous user

Navigation menu