Changes

experimental: equipment infobox float left by default
Line 26: Line 26:  
| 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 44: Line 44:  
_row_starter = "|-",
 
_row_starter = "|-",
 
_compatibility_cell = [[| style="width: 190px; text-align: center; background-color: ${bg_color};" | ${label}]],
 
_compatibility_cell = [[| style="width: 190px; text-align: center; background-color: ${bg_color};" | ${label}]],
 +
_lbas_compatibility_row = [=[|-
 +
| 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>]],
 
_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>]],
 
_flight_stats_template = [[<div id="kc-eq-flights"><b>Combat Radius: ${combat_radius}</b> (Deployment Cost: ${deployment_cost})</div>]],
Line 69: Line 71:  
_buildable = "'''Buildable'''",
 
_buildable = "'''Buildable'''",
 
_unbuildable = "''Unbuildable''",
 
_unbuildable = "''Unbuildable''",
_float_style_template =  "float: ${float};",
+
_float_style_template =  " float: left; margin: 0 1.5em 1em 0;",
 
_shown_ship_types = {
 
_shown_ship_types = {
 
1, 2,
 
1, 2,
Line 226: 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 327: 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 456: Line 461:  
self._vars.table_class = table.concat(table_classes, " ")
 
self._vars.table_class = table.concat(table_classes, " ")
 
self._vars.table_id = collapsible and collapsible ~= "true" and ("mw-customcollapsible-" .. collapsible) or ""
 
self._vars.table_id = collapsible and collapsible ~= "true" and ("mw-customcollapsible-" .. collapsible) or ""
self._vars.float = self._args.float and format{self._float_style_template, float = self._args.float} or ""
+
self._vars.float = self._args.float and "" or self._float_style_template
 
end
 
end
  
311

edits