• 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 29: Line 29:  
! colspan="4" style="background-color: LightSkyBlue;" | '''Equipment'''
 
! colspan="4" style="background-color: LightSkyBlue;" | '''Equipment'''
 
|- style="background-color: whitesmoke;"
 
|- style="background-color: whitesmoke;"
| colspan="4" style="text-align: center;" |
+
| colspan="4" style="text-align: center;" | ${slot_details}
 +
|-
 +
| colspan="4" style="padding: 0px;" | <div class="mw-collapsible mw-collapsed">
 +
<div style="background-color: lightskyblue; text-align: center; margin: 0px;">'''Extra Statistics'''</div>
 +
<div class="mw-collapsible-content" style="padding: 2px">
 +
<p style="display: ${opening_airstrike_display};">Airstrike: ${opening_airstrike}</p>
 +
<p>${day_battle}</p>
 +
<p style="display: ${artillery_spotting_display};">${artillery_spotting}</p>
 +
<p style="display: ${opening_torpedo_display};">Opening Salvo</p>
 +
<p style="display: ${closing_torpedo_display};">Torpedo: ${closing_torpedo}</p>
 +
<p>ASW ${asw_attack}</p>
 +
<p>NB ${night_battle}</p>
 +
</div>
 +
</div>
 
|}]],
 
|}]],
 
}
 
}
Line 36: Line 49:  
local link, text, section = self._ship:link()
 
local link, text, section = self._ship:link()
 
self._vars.name = Formatting:format_link(link, text, section)
 
self._vars.name = Formatting:format_link(link, text, section)
 +
end
 +
 +
function EnemyShipInfoMini:slot_details()
 +
local slots = {}
 +
for i = 1, self._default_slot_num do
 +
local num_of_slots, num_of_enabled_slots = self._ship:slots_length(), self._ship:slots()
 +
local locked = num_of_enabled_slots and i > num_of_enabled_slots
 +
local icon = ""
 +
if num_of_slots and i > num_of_slots then
 +
 +
else
 +
local equipment, link = self._ship:slot(i), nil
 +
if equipment then
 +
icon = equipment:icon()
 +
link = equipment:link()
 +
else
 +
icon = locked and "" or false
 +
end
 +
if icon ~= "" then
 +
icon = Formatting:format_image{Formatting:format_equipment_icon(icon), caption = link, link = link}
 +
end
 +
end
 +
table.insert(slots, icon)
 +
end
 +
self._vars.slot_details = table.concat(slots)
 
end
 
end
   Line 63: Line 101:  
end
 
end
 
end
 
end
 +
 +
EnemyShipInfoMini.test = EnemyShipInfoMini.EnemyInfoboxMini(nil, {"Destroyer I-Class"})
    
return EnemyShipInfoMini
 
return EnemyShipInfoMini
cssedit, gkautomate
7,064

edits

Navigation menu