• 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 1: Line 1:  
local Formatting = require('Module:Formatting')
 
local Formatting = require('Module:Formatting')
 
local ShipInfoKai = require('Module:ShipInfoKai')
 
local ShipInfoKai = require('Module:ShipInfoKai')
local ShipCapabilities = require('Module:ShipCapabilities')
  −
local EnemyShip = require('Module:EnemyShip')
      
local EnemyShipInfoMini = ShipInfoKai{
 
local EnemyShipInfoMini = ShipInfoKai{
Line 32: Line 30:  
| colspan="4" style="padding: 0px;" |<div style="background-color: lightskyblue; cursor: pointer; text-align: center; margin: 0px;" class="mw-customtoggle-extra">'''Extra'''</div>
 
| colspan="4" style="padding: 0px;" |<div style="background-color: lightskyblue; cursor: pointer; text-align: center; margin: 0px;" class="mw-customtoggle-extra">'''Extra'''</div>
 
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-extra" style="padding: 2px; font-size: 12px;">
 
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-extra" style="padding: 2px; font-size: 12px;">
<div style="display: ${opening_airstrike_display};">Airstrike (${opening_airstrike})</div>
+
Some notes maybe
<div>${day_battle}</div>
  −
<div style="display: ${artillery_spotting_display};">${artillery_spotting}</div>
  −
<div style="display: ${opening_torpedo_display};">Opening Salvo</div>
  −
<div style="display: ${closing_torpedo_display};">Torpedo (${closing_torpedo})</div>
  −
<div>ASW ${asw_attack}</div>
  −
<div>NB ${night_battle}</div>
   
</div>
 
</div>
 
|}]],
 
|}]],
_display_flex = "flex",
  −
_display_none = "none",
   
}
 
}
   Line 68: Line 58:  
function EnemyShipInfoMini:asw()
 
function EnemyShipInfoMini:asw()
 
self._vars.asw = Formatting:format_stat(self._ship:asw(), self._ship:asw())
 
self._vars.asw = Formatting:format_stat(self._ship:asw(), self._ship:asw())
end
  −
  −
function EnemyShipInfoMini:add_fields()
  −
table.insert(self._fields, "capabilities")
  −
end
  −
  −
function EnemyShipInfoMini:capabilities()
  −
local capabilities = ShipCapabilities{ship = self._ship}
  −
local opening_airstrike = { capabilities:opening_airstrike() }
  −
local opening_torpedo = { capabilities:opening_torpedo() }
  −
local day_battle = { capabilities:day_battle() }
  −
local artillery_spotting = { capabilities:artillery_spotting() }
  −
local closing_torpedo = { capabilities:closing_torpedo() }
  −
local asw_attack = { capabilities:asw_attack() }
  −
local night_battle = { capabilities:night_battle() }
  −
self._vars.opening_airstrike_display, self._vars.opening_airstrike = opening_airstrike[1] and self._display_flex or self._display_none, capabilities:format_opening_airstrike(unpack(opening_airstrike))
  −
self._vars.opening_torpedo_display, self._vars.opening_torpedo = opening_torpedo[1] and self._display_flex or self._display_none, capabilities:format_opening_torpedo(unpack(opening_torpedo))
  −
self._vars.day_battle = capabilities:format_day_battle(unpack(day_battle))
  −
self._vars.artillery_spotting_display, self._vars.artillery_spotting = artillery_spotting[1] and self._display_flex or self._display_none, capabilities:format_artillery_spotting(unpack(artillery_spotting))
  −
self._vars.closing_torpedo_display, self._vars.closing_torpedo = closing_torpedo[1] and self._display_flex or self._display_none, capabilities:format_closing_torpedo(unpack(closing_torpedo))
  −
self._vars.asw_attack = capabilities:format_asw_attack(unpack(asw_attack))
  −
self._vars.night_battle = capabilities:format_night_battle(unpack(night_battle))
  −
end
  −
  −
function EnemyShipInfoMini:create_item()
  −
if self._args.name then
  −
self._ship = EnemyShip(self._args.name, self._args.model)
  −
else
  −
self._ship = EnemyShip(self._args[1])
  −
end
   
end
 
end
  
cssedit, gkautomate
7,064

edits

Navigation menu