• 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
m
no edit summary
Line 216: Line 216:     
function NodeInfo:build_rows()
 
function NodeInfo:build_rows()
 +
    local bg_color
 
for index, row_values in ipairs(self._data_rows) do
 
for index, row_values in ipairs(self._data_rows) do
 
if row_values ~= "break" then
 
if row_values ~= "break" then
Line 222: Line 223:  
table.insert(self._rows, self._header)
 
table.insert(self._rows, self._header)
 
elseif type(row_values) == "table" then
 
elseif type(row_values) == "table" then
    local bg_color = "initial"
+
    if row_values["node"] then
 +
        bg_color = row_values["node"].bg_color
 +
    elseif bg_color == nil then
 +
        bg_color = "initial"
 +
    end
 
for _, column in ipairs(self._columns) do
 
for _, column in ipairs(self._columns) do
    if column == "node" and row_values[column].bg_color ~= "initial" then
+
        if row_values[column] then
        bg_color = row_values[column].bg_color
+
        row_values[column].bg_color = bg_color
 
    end
 
    end
    row_values[column].bg_color = bg_color
   
if row_values[column] then
 
if row_values[column] then
 
table.insert(self._rows, format(self._column_cell_templates[column] or self._cell, row_values[column]))
 
table.insert(self._rows, format(self._column_cell_templates[column] or self._cell, row_values[column]))
48

edits

Navigation menu