- 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 54:
Line 54:
− _columns = { +
Line 282:
Line 282:
+
Line 290:
Line 291:
− +
− +
Line 314:
Line 315:
− +
Line 324:
Line 325:
− +
− +
Line 335:
Line 336:
+
Fix column headers, row construction
"notes",
"notes",
},
},
_list_columns = {
"id",
"id",
"stars",
"stars",
if self._args.comparison == "true" then
if self._args.comparison == "true" then
self._columns = self._comparison_columns
self._shown_stats = {}
self._shown_stats = {}
else
else
row_values = {}
row_values = {}
for _, column in ipairs(self._comparison_columns) do
for _, column in ipairs(self._columns) do
row_values[column] = self[column](self, equipment)
row_values[column] = self[column](self, equipment)
end
end
if index > 1 then
if index > 1 then
for _, column in ipairs(self._comparison_columns) do
for _, column in ipairs(self._columns) do
for i=index-1,1,-1 do
for i=index-1,1,-1 do
local previous_row = data_rows[i]
local previous_row = data_rows[i]
end
end
else
else
for _, column in ipairs(self._comparison_columns) do
for _, column in ipairs(self._columns) do
row_values[column].rowspan = 1
row_values[column].rowspan = 1
end
end
local stat_columns = {}
local stat_columns = {}
for stat_column, _ in pairs(self._shown_stats) do
for stat_column, _ in pairs(self._shown_stats) do
table.insert(stat_columns, Formatting:format_image{StatIcons[stat_column], caption = Formatting:format_stat_name(stat_column)})
table.insert(stat_columns, format{self._column_header_cell_template, value = Formatting:format_image{StatIcons[stat_column], caption = Formatting:format_stat_name(stat_column)}})
end
end
for _, column in ipairs(self._comparison_columns) do
for _, column in ipairs(self._columns) do
if not self._shown_stats[column] then
if not self._shown_stats[column] then
for _, row_values in ipairs(data_rows) do
for _, row_values in ipairs(data_rows) do
header = format{self._header_template, stat_columns = table.concat(stat_columns, "\n")}
header = format{self._header_template, stat_columns = table.concat(stat_columns, "\n")}
else
else
self._columns = self._list_columns
header = format{self._header_template, stat_columns = format{self._column_header_cell_template, value = self._stats_column_label}}
header = format{self._header_template, stat_columns = format{self._column_header_cell_template, value = self._stats_column_label}}
for _, equipment in ipairs(equipment_list) do
for _, equipment in ipairs(equipment_list) do