- 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
Line 62:
Line 62:
− +
Line 90:
Line 90:
− +
− +
Line 107:
Line 107:
− +
− +
Line 182:
Line 182:
− +
Line 188:
Line 188:
− fuel = ResourceIcons.fuel,
− ammo = ResourceIcons.ammo,
− steel = ResourceIcons.steel,
− bauxite = ResourceIcons.bauxite,
Line 198:
Line 194:
− +
+
+
+
Fix more bugssss
if products then
if products then
if self._single_item then
if self._single_item then
self._title_row = format{[[|+ ${icon}{$name}]], icon = Formatting:format_image{Formatting:format_equipment_icon(item:icon())}, name = Formatting:format_link(item:link())}
self._title_row = format{[[|+ ${icon}${name}]], icon = Formatting:format_image{Formatting:format_equipment_icon(item:icon())}, name = Formatting:format_link(item:link())}
else
else
self._custom_rows[item:name()] = format{[[| colspan="12" style="text-align: center; padding:5px 5px 5px 5px;" | ${icon}${name}]], icon = Formatting:format_image{Formatting:format_equipment_icon(item:icon())}, name = Formatting:format_link(item:link())}
self._custom_rows[item:name()] = format{[[| colspan="12" style="text-align: center; padding:5px 5px 5px 5px;" | ${icon}${name}]], icon = Formatting:format_image{Formatting:format_equipment_icon(item:icon())}, name = Formatting:format_link(item:link())}
for equip, count in pairs(consumed_equipment_table) do
for equip, count in pairs(consumed_equipment_table) do
local equipment = equip ~= true and Equipment(equip) or row_data.item
local equipment = equip ~= true and Equipment(equip) or row_data.item
table.insert(consumed_equipment, format{self._equipment_item, count = count, icon = Formatting:format_equipment_icon_simple(equipment:icon()), name = Formatting:format_link(equipment:link())})
table.insert(consumed_equipment, format{self._equipment_item, count = count, icon = Formatting:format_image{Formatting:format_equipment_icon_simple(equipment:icon())}, name = Formatting:format_link(equipment:link())})
end
end
table.insert(result, format{self._consumed_equipment_label, list = table.concat(consumed_equipment, "<br />")})
table.insert(result, format{self._consumed_equipment_label, list = table.concat(consumed_equipment, "<br />")})
if row_data.stars == self._improvement_brackets[#self._improvement_brackets] and row_data.product then
if row_data.stars == self._improvement_brackets[#self._improvement_brackets] and row_data.product then
local product = Equipment(row_data.product)
local product = Equipment(row_data.product)
table.insert(result, format{self._produced_equipment_label, icon = Formatting:format_equipment_icon_simple(product:icon()), name = Formatting:format_link(product:link())})
table.insert(result, format{self._produced_equipment_label, icon = Formatting:format_image{Formatting:format_equipment_icon_simple(product:icon())}, name = Formatting:format_link(product:link())})
end
end
value = table.concat(result, "<br />")
value = table.concat(result, "<br />")
function ImprovementTableKai:development_material(row_data)
function ImprovementTableKai:development_material(row_data)
return {values = {value = format{self._material_cell_content, normal = row_data.resources.development_material, slider = row_data.resources_x.development_material}}, bg_color = self._transparent, text_align = self._center_align}
return {values = {value = format{self._material_cell_content, normal = row_data.resources.devmat, slider = row_data.resources_x.devmat}}, bg_color = self._transparent, text_align = self._center_align}
end
end
function ImprovementTableKai:improvement_material(row_data)
function ImprovementTableKai:improvement_material(row_data)
return {values = {value = format{self._material_cell_content, normal = row_data.resources.improvement_material, slider = row_data.resources_x.improvement_material}}, bg_color = self._transparent, text_align = self._center_align}
return {values = {value = format{self._material_cell_content, normal = row_data.resources.screw, slider = row_data.resources_x.screw}}, bg_color = self._transparent, text_align = self._center_align}
end
end
self._rows = {self._table_start, self._title_row, self._header}
self._rows = {self._table_start, self._title_row, self._header}
else
else
self._rows = {self._table_start, self._header}
self._rows = {self._table_start}
end
end
end
end
function ImprovementTableKai:create_header()
function ImprovementTableKai:create_header()
local header_icons = {
local header_icons = {
devmat = ResourceIcons.devmat,
devmat = ResourceIcons.devmat,
screw = ResourceIcons.screw,
screw = ResourceIcons.screw,
header_icons[key] = Formatting:format_image{value, caption = Formatting:format_stat_name(key)}
header_icons[key] = Formatting:format_image{value, caption = Formatting:format_stat_name(key)}
end
end
self._header = format{self._header_template, stat_columns = format{self._column_header_cell_template, value = self._stats_column_label}}
if self._single_item then
header_icons.resources = Formatting:format_resources(self._items[1].item:improvement_resources())
end
self._header = format(self._header_template, header_icons)
end
end
return ImprovementTableKai
return ImprovementTableKai