• 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
m
no edit summary
Line 6: Line 6:  
local Tabber = require('Module:Tabber')
 
local Tabber = require('Module:Tabber')
   −
local U = require('Module:Utils')
+
local U = require('Module:Core')
 
local format = U.format
 
local format = U.format
   Line 14: Line 14:  
| colspan="2" id="kc-eq-namecard" style="position: relative; padding: 10px 40px; text-align: center; background-color: ${back};${extra_style};" title="${rarity}" | <div id="kc-eq-edit-link" style="position: absolute; right: 5px;">${edit_link}</div>
 
| colspan="2" id="kc-eq-namecard" style="position: relative; padding: 10px 40px; text-align: center; background-color: ${back};${extra_style};" title="${rarity}" | <div id="kc-eq-edit-link" style="position: absolute; right: 5px;">${edit_link}</div>
 
<div id="kc-eq-en-name" style="font-size: 20px; margin:0 0 4px 0;">'''${name}'''</div>
 
<div id="kc-eq-en-name" style="font-size: 20px; margin:0 0 4px 0;">'''${name}'''</div>
<div id="kc-eq-local-name" style="margin:4px 0;">${localized_name}</div>
+
${localized_name}
 
<div id="kc-eq-jp-entry" style="margin:4px 0 0 0;">'''No.${id} ${japanese_name}'''</div>
 
<div id="kc-eq-jp-entry" style="margin:4px 0 0 0;">'''No.${id} ${japanese_name}'''</div>
 
|-
 
|-
 
| colspan="2" id="kc-eq-statscard" style="text-align: center; background-color: whitesmoke;" |
 
| colspan="2" id="kc-eq-statscard" style="text-align: center; background-color: whitesmoke;" |
 
<div id="kc-eq-category" style="margin:0 0 4px 0;">${icon} <b>${eq_type}</b>${eq_group}</div>
 
<div id="kc-eq-category" style="margin:0 0 4px 0;">${icon} <b>${eq_type}</b>${eq_group}</div>
<div id="kc-eq-effects" style="margin:4px 0;"><b>Effects: ${effects}</b>${flight_stats}</div>
+
<div id="kc-eq-effects" style="margin:4px 0;"><b>Effects: ${effects}</b></div>
 +
${flight_stats}
 
<div id="kc-eq-scrap" style="margin:4px 0 0 0;">'''Scrap value: ${scrap}''' (${buildable})</div>
 
<div id="kc-eq-scrap" style="margin:4px 0 0 0;">'''Scrap value: ${scrap}''' (${buildable})</div>
<div id="kc-eq-alts" style="margin:4px 0 0 0;">${alternative_names}</div>
+
${alternative_names}
 
|-
 
|-
 
| colspan="2" id="kc-eq-pictures" style="text-align: center;" | ${card}
 
| colspan="2" id="kc-eq-pictures" style="text-align: center;" | ${card}
 
|-
 
|-
| colspan="2" id="kc-eq-fits" style="text-align: center; background-color: LightSkyBlue;" | '''Refittable Class'''
+
| colspan="2" id="kc-eq-fits" style="text-align: center; background-color: LightSkyBlue;" | '''Refittable Ship Types'''
 
${compatibility_details}${bonus_details}
 
${compatibility_details}${bonus_details}
 
|}]],
 
|}]],
Line 42: Line 43:  
--|}]],
 
--|}]],
 
_row_starter = "|-",
 
_row_starter = "|-",
_compatibility_cell = [[| style="width: 190px; text-align: center; background-color: ${bg_color};" | <div style="background-color: ${bg_color};">${label}</div>]],
+
_compatibility_cell = [[| style="width: 190px; text-align: center; background-color: ${bg_color};" | ${label}]],
_localized_name_template = "''${localized_name}''",
+
_lbas_compatibility_row = [=[|-
_flight_stats_template = [[<b>Combat Radius: ${combat_radius}</b> (Deployment Cost: ${deployment_cost})]],
+
| colspan="2" style="text-align: center; background-color: LightSkyBlue;" | '''[[LBAS]] Plane''']=],
 +
_localized_name_template = [[<div id="kc-eq-local-name" style="margin:4px 0;">${localized_name}</div>]],
 +
_flight_stats_template = [[<div id="kc-eq-flights"><b>Combat Radius: ${combat_radius}</b> (Deployment Cost: ${deployment_cost})</div>]],
 
_alternative_names_template = [[  
 
_alternative_names_template = [[  
 
|-
 
|-
| colspan="2" style="text-align: center; padding: 0px;" | <div class="mw-collapsible mw-collapsed" style="background-color: lightgrey; margin: 0px;">''Alternate names''<div class="mw-collapsible-content" style="background-color: whitesmoke;">
+
| colspan="2" id="kc-eq-altnames" style="text-align: center; padding: 0px;" | <div class="mw-collapsible mw-collapsed" style="background-color: lightgrey; margin: 0px;">''Alternate names''<div class="mw-collapsible-content" style="background-color: whitesmoke;">
 
${names}
 
${names}
 
</div></div>]],
 
</div></div>]],
Line 225: Line 228:  
function EquipmentInfoKai:eq_type()
 
function EquipmentInfoKai:eq_type()
 
local eq_type = self._equipment:type()
 
local eq_type = self._equipment:type()
self._vars.eq_type = Formatting:format_equipment_types(self._equipment)
+
self._vars.eq_type = Formatting:format_equipment_type(self._equipment:type())
 
local album_type = self._equipment:album_type()
 
local album_type = self._equipment:album_type()
 
if album_type then
 
if album_type then
Line 326: Line 329:  
table.insert(result, format{self._compatibility_cell, bg_color = Formatting:format_equipment_compatibility(compatibility), label = ship_label})
 
table.insert(result, format{self._compatibility_cell, bg_color = Formatting:format_equipment_compatibility(compatibility), label = ship_label})
 
--table.insert(result, format{self._compatibility_cell, bg_color = Formatting:format_equipment_compatibility_color(compatibility), label = ship_label})
 
--table.insert(result, format{self._compatibility_cell, bg_color = Formatting:format_equipment_compatibility_color(compatibility), label = ship_label})
 +
end
 +
if self._equipment:is_lbas_plane() then
 +
table.insert(result, self._lbas_compatibility_row)
 
end
 
end
 
self._vars.compatibility_details = table.concat(result, "\n")
 
self._vars.compatibility_details = table.concat(result, "\n")
Line 435: Line 441:     
function EquipmentInfoKai:create_item()
 
function EquipmentInfoKai:create_item()
if self._args.name then
+
self._equipment = Equipment(self._args[1], self._enemy)
self._equipment = Equipment(self._args.name, self._args.model)
  −
else
  −
self._equipment = Equipment(self._args[1])
  −
end
   
end
 
end
  
34,633

edits

Navigation menu