Line 34: |
Line 34: |
| function formatTable(map_nodes) | | function formatTable(map_nodes) |
| local rows = {} | | local rows = {} |
− | for node_label, node_data in pairs(map_nodes) do | + | for _, node_data in ipairs(map_nodes) do |
| table.insert(rows, format{ | | table.insert(rows, format{ |
| templates.node_title_row, | | templates.node_title_row, |
− | node_label = node_label, | + | node_label = node_data.label, |
| node_name = node_data.name, | | node_name = node_data.name, |
| }) | | }) |
Line 71: |
Line 71: |
| table.insert(rows, format{ | | table.insert(rows, format{ |
| templates.node_pattern_row, | | templates.node_pattern_row, |
− | node_label = node_label, | + | node_label = node_data.label, |
| pattern_id = i, | | pattern_id = i, |
| formations_string = formations_string, | | formations_string = formations_string, |
Line 93: |
Line 93: |
| end | | end |
| | | |
− | -- MapNodesTable.t = MapNodesTable.format(nil, { "6-5" })
| + | MapNodesTable.t = MapNodesTable.format(nil, { "6-5" }) |
| | | |
| return MapNodesTable | | return MapNodesTable |