• 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 19: Line 19:  
end
 
end
   −
local function getEquipmentCard(eq)
+
local function getEquipmentCard(eq, cardSize)
 
     local id = tonumber(eq)
 
     local id = tonumber(eq)
 
     if id then
 
     if id then
 
         eq = EquipmentByApiId[id]
 
         eq = EquipmentByApiId[id]
 
     end
 
     end
     return EquipmentCardKai:Asset({ eq, size = '80px' })
+
     return EquipmentCardKai:Asset({ eq, size = cardSize or '100px' })
 
end
 
end
   Line 136: Line 136:  
             table.insert(result, fleetNote)
 
             table.insert(result, fleetNote)
 
             table.insert(result, tableHeaderFriend)
 
             table.insert(result, tableHeaderFriend)
 +
            local has5thSlot = U.ifindBy(fleet.fleet, function(ship) return ship.equipment[5] end)
 +
            local cardSize = has5thSlot and '70px' or '100px'
 
             for j, ship in ipairs(fleet.fleet) do
 
             for j, ship in ipairs(fleet.fleet) do
 
                 table.insert(result, string.format(
 
                 table.insert(result, string.format(
Line 141: Line 143:  
                     getShipCard(ship.ship),
 
                     getShipCard(ship.ship),
 
                     ship.level,
 
                     ship.level,
                     ship.equipment[1] and getEquipmentCard(ship.equipment[1]) or '',
+
                     ship.equipment[1] and getEquipmentCard(ship.equipment[1], cardSize) or '',
                     ship.equipment[2] and getEquipmentCard(ship.equipment[2]) or '',
+
                     ship.equipment[2] and getEquipmentCard(ship.equipment[2], cardSize) or '',
                     ship.equipment[3] and getEquipmentCard(ship.equipment[3]) or '',
+
                     ship.equipment[3] and getEquipmentCard(ship.equipment[3], cardSize) or '',
                     ship.equipment[4] and getEquipmentCard(ship.equipment[4]) or '',
+
                     ship.equipment[4] and getEquipmentCard(ship.equipment[4], cardSize) or '',
                     ship.equipment[5] and getEquipmentCard(ship.equipment[5]) or '',
+
                     ship.equipment[5] and getEquipmentCard(ship.equipment[5], cardSize) or '',
 
                     type(ship.hp) == 'table' and formatHp(ship.hp, ship.maxHp) or ship.hp ~= ship.maxHp and string.format('%s/%s', ship.hp, ship.maxHp) or ship.maxHp,
 
                     type(ship.hp) == 'table' and formatHp(ship.hp, ship.maxHp) or ship.hp ~= ship.maxHp and string.format('%s/%s', ship.hp, ship.maxHp) or ship.maxHp,
 
                     ship.firepower,
 
                     ship.firepower,
cssedit, gkautomate
6,941

edits

Navigation menu