Changes

repurposed "library_name" to "card_name"
Line 10: Line 10:     
local EquipmentInfoKai = BaseData{
 
local EquipmentInfoKai = BaseData{
_template = [[{|class="${table_class}" id="${table_id}" style="border: 1px solid darkgray; width: 380px; background-color: #fafafa;${float}"
+
_template = [[{|class="${table_class}" id="${table_id}" style="border: 1px solid darkgray; width: 360px; background-color: #fafafa;"
 
|-
 
|-
 
| 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>
Line 62: Line 62:  
_high_angle_label = "High-angle",
 
_high_angle_label = "High-angle",
 
--_plus_fire_director_label = " + Fire Director",
 
--_plus_fire_director_label = " + Fire Director",
_library_name_label = "Library name",
+
_card_name_label = "Card name",
 
_list_name_label = "List name",
 
_list_name_label = "List name",
 
_comparison_name_label = "Comparison name",
 
_comparison_name_label = "Comparison name",
Line 71: Line 71:  
_buildable = "'''Buildable'''",
 
_buildable = "'''Buildable'''",
 
_unbuildable = "''Unbuildable''",
 
_unbuildable = "''Unbuildable''",
_float_style_template =  " float: left; margin: 0 1.5em 1em 0;",
   
_shown_ship_types = {
 
_shown_ship_types = {
 
8, 9,
 
8, 9,
Line 148: Line 147:  
local alternative_names = {}
 
local alternative_names = {}
 
local list_name = self._equipment:list_name()
 
local list_name = self._equipment:list_name()
local library_name = self._equipment:library_name()
+
local card_name = self._equipment:card_name()
 
local comparison_name = self._equipment:comparison_name()
 
local comparison_name = self._equipment:comparison_name()
 
local battle_name = self._equipment:battle_name()
 
local battle_name = self._equipment:battle_name()
Line 165: Line 164:  
table.insert(alternative_names, format{self._alternative_name_template, label = self._list_name_label, name = list_name, japanese_name = list_japanese_name})
 
table.insert(alternative_names, format{self._alternative_name_template, label = self._list_name_label, name = list_name, japanese_name = list_japanese_name})
 
end
 
end
if library_name then
+
if card_name then
local library_japanese_name = self._equipment:library_japanese_name()
+
local card_japanese_name = self._equipment:card_japanese_name()
local library_reading = self._equipment:library_reading()
+
local card_reading = self._equipment:card_reading()
if library_reading ~= false then
+
if card_reading ~= false then
library_japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(library_japanese_name), Formatting:format_stat(library_reading)))
+
card_japanese_name = tostring(Formatting:japanese_text(Formatting:format_stat(card_japanese_name), Formatting:format_stat(card_reading)))
 
end
 
end
local library_localized_name = self._equipment:library_localized_name()
+
local card_localized_name = self._equipment:card_localized_name()
if library_localized_name then
+
if card_localized_name then
library_name = Formatting:tooltip(Formatting:format_stat(library_name), Formatting:format_stat(library_localized_name))
+
card_name = Formatting:tooltip(Formatting:format_stat(card_name), Formatting:format_stat(card_localized_name))
 
else
 
else
library_name = Formatting:format_stat(library_name)
+
card_name = Formatting:format_stat(card_name)
 
end
 
end
table.insert(alternative_names, format{self._alternative_name_template, label = self._library_name_label, name = library_name, japanese_name = library_japanese_name})
+
table.insert(alternative_names, format{self._alternative_name_template, label = self._card_name_label, name = card_name, japanese_name = card_japanese_name})
 
end
 
end
 
if comparison_name then
 
if comparison_name then
Line 304: Line 303:  
caption = table.concat(card_caption)
 
caption = table.concat(card_caption)
 
end
 
end
tabber:add_tab("Card", EquipmentCardKai:get{equip = self._equipment, caption = caption})
+
tabber:add_tab("Card", EquipmentCardKai:get{equip = self._equipment, caption = caption, size = "350px", align = "center"})
tabber:add_tab("Fairy", EquipmentGraphicKai:get{equip = self._equipment, fairy = "only"})
+
tabber:add_tab("Fairy", EquipmentGraphicKai:get{equip = self._equipment, fairy = "only", size = "350px", align = "center"})
tabber:add_tab("Equipment", EquipmentGraphicKai:get{equip = self._equipment})
+
tabber:add_tab("Equipment", EquipmentGraphicKai:get{equip = self._equipment, size = "350px", align = "center"})
tabber:add_tab("Combination", EquipmentGraphicKai:get{equip = self._equipment, fairy = true})
+
tabber:add_tab("Combination", EquipmentGraphicKai:get{equip = self._equipment, fairy = true, size = "350px", align = "center"})
 
self._vars.card = tostring(tabber)
 
self._vars.card = tostring(tabber)
 
end
 
end
Line 461: Line 460:  
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 "" or self._float_style_template
+
-- self._vars.float = self._args.float and "" or self._float_style_template
 
end
 
end
  
46,803

edits