• 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
add node types
Line 13: Line 13:  
! style="min-width:calc(160px * 3);width:calc(160px * 3);" |Fleet
 
! style="min-width:calc(160px * 3);width:calc(160px * 3);" |Fleet
 
!AP<br />AS<br />AS+
 
!AP<br />AS<br />AS+
!Base Exp
+
!Base<br />Exp
 
!HQ
 
!HQ
 
]],
 
]],
Line 20: Line 20:     
     node_title_row = [[|-
 
     node_title_row = [[|-
! colspan="7" |Node ${node_label} : ${node_name}]],
+
! colspan="7" |Node ${node_label} : ${node_name} ${type}]],
   −
     node_pattern_row = [[|-
+
     node_pattern_row = [[|- style="background:#${background_color};"
 
| style="text-align:center;" |${node_label}<sub>${pattern_id}</sub>
 
| style="text-align:center;" |${node_label}<sub>${pattern_id}</sub>
 
| style="text-align:center;" |${formations_string}
 
| style="text-align:center;" |${formations_string}
Line 30: Line 30:  
| style="text-align:center;" |${hq}]],
 
| style="text-align:center;" |${hq}]],
    +
}
 +
 +
local type_styles = {
 +
    night = { type = "(Night Battle)", background_color = "BBDEFB" },
 +
    aerial = { type = "(Aerial Battle)", background_color = "C8E6C9" },
 +
    raid = { type = "(Air Raid Battle)", background_color = "81C784" },
 
}
 
}
   Line 35: Line 41:  
     local rows = {}
 
     local rows = {}
 
     for _, node_data in ipairs(map_nodes) do
 
     for _, node_data in ipairs(map_nodes) do
 +
        local type_style = type_styles[node_data.type]
 
         table.insert(rows, format{
 
         table.insert(rows, format{
 
             templates.node_title_row,
 
             templates.node_title_row,
 
             node_label = node_data.label,
 
             node_label = node_data.label,
 
             node_name = node_data.name,
 
             node_name = node_data.name,
 +
            type = type_style and type_style.type or "",
 
         })
 
         })
 
         for i, pattern_data in ipairs(node_data.patterns) do
 
         for i, pattern_data in ipairs(node_data.patterns) do
Line 80: Line 88:  
                 exp = pattern_data.exp or "?",
 
                 exp = pattern_data.exp or "?",
 
                 hq = pattern_data.hq or "?",
 
                 hq = pattern_data.hq or "?",
 +
                background_color = type_style and type_style.background_color or "",
 
             })
 
             })
 
         end
 
         end
Line 95: Line 104:  
end
 
end
   −
-- MapNodesTable.t = MapNodesTable.format(nil, { "6-5" })
+
MapNodesTable.t = MapNodesTable.format(nil, { "6-5" })
    
return MapNodesTable
 
return MapNodesTable
cssedit, gkautomate
7,064

edits

Navigation menu