- 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 10:
Line 10:
− +
Line 44:
Line 44:
+
Line 65:
Line 66:
− +
Line 222:
Line 223:
− +
− local header_icons = { +
− +
− header_icons[key] = Formatting:format_image{value, caption = Formatting:format_stat_name(key)} +
+
+
+
− header_icons.resources = Formatting:format_resources(self._items[1].item:improvement_resources()) +
+
+
+
+
+
+
+
+
+
+
− self._header = format(self._header_template, header_icons) +
no edit summary
_item_class = Equipment,
_item_class = Equipment,
_header_template = [[
_header_template = [[
! style="text-align: center; padding: 5px;" | Improvement Cost: ${resources}
! style="text-align: center; padding: 5px;" | ${resources}
! style="text-align: center; padding: 5px;" | ★
! style="text-align: center; padding: 5px;" | ★
! style="text-align: center; padding: 5px;" | ${devmat}
! style="text-align: center; padding: 5px;" | ${devmat}
10
10
},
},
_basic_resources_label = "Improvement Cost: ",
_consumed_equipment_label = "<small>Consumes: ${list}</small>",
_consumed_equipment_label = "<small>Consumes: ${list}</small>",
_produced_equipment_label = "<b><small>Produces: 1x ${icon}${name}</small></b>",
_produced_equipment_label = "<b><small>Produces: 1x ${icon}${name}</small></b>",
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} / ${resources}]], icon = Formatting:format_image{Formatting:format_equipment_icon(item:icon())}, name = Formatting:format_link(item:link()), resources = Formatting:format_resources(item:improvement_resources())}
table.insert(result, item:name())
table.insert(result, item:name())
end
end
end
end
function ImprovementTableKai:create_header()
function ImprovementTableKai:create_table_prep()
self._header_icons = {
devmat = ResourceIcons.devmat,
devmat = ResourceIcons.devmat,
screw = ResourceIcons.screw,
screw = ResourceIcons.screw,
}
}
for key, value in pairs(header_icons) do
for key, value in pairs(self._header_icons) do
self._header_icons[key] = Formatting:format_image{value, caption = Formatting:format_stat_name(key)}
end
end
end
function ImprovementTableKai:create_header()
if self._single_item then
if self._single_item then
self._header_icons.resources = self._basic_resources_label .. Formatting:format_resources(self._items[1].item:improvement_resources())
else
self._header_icons.resources = ""
end
self._header = format(self._header_template, self._header_icons)
end
function ImprovementTableKai:finish_rows()
if not self._single_item then
table.insert(self._rows, self._row_starter)
table.insert(self._rows, self._header_bottom or self._header)
end
end
table.insert(self._rows, self._table_end)
end
end