Line 7: |
Line 7: |
| | | |
| table_header = [[{| class="wikitable mw-collapsible mw-collapsed typography-xl-optout" style="width:100%" | | table_header = [[{| class="wikitable mw-collapsible mw-collapsed typography-xl-optout" style="width:100%" |
− | ! colspan="7" |Enemy patterns | + | ! colspan="7" |<span style="float:left;">[[http://kancolle.wikia.com/wiki/Module:Map_${map_id}/Nodes Edit]]</span>Enemy patterns |
| |- | | |- |
| !# | | !# |
− | !Form | + | !Formation |
| ! 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<br />Exp | + | !Base<br />exp. |
− | !HQ | + | !<span class="explain" title="Registered HQ level range for a pattern.">HQ</span> |
| ]], | | ]], |
| | | |
Line 38: |
Line 38: |
| } | | } |
| | | |
− | function formatTable(map_nodes) | + | function formatTable(map_id, map_nodes) |
| local rows = {} | | local rows = {} |
| for _, node_data in ipairs(map_nodes) do | | for _, node_data in ipairs(map_nodes) do |
Line 92: |
Line 92: |
| end | | end |
| end | | end |
− | return templates.table_header .. table.concat(rows, "\n") .. templates.table_footer | + | return format{templates.table_header, map_id = map_id} .. table.concat(rows, "\n") .. templates.table_footer |
| end | | end |
| | | |
Line 101: |
Line 101: |
| local map_id = args[1] | | local map_id = args[1] |
| local map_nodes = require(string.format('Module:Map %s/Nodes', map_id)) | | local map_nodes = require(string.format('Module:Map %s/Nodes', map_id)) |
− | return formatTable(map_nodes) | + | return formatTable(map_id, map_nodes) |
| end | | end |
| | | |
| MapNodesTable.t = MapNodesTable.format(nil, { "6-5" }) | | MapNodesTable.t = MapNodesTable.format(nil, { "6-5" }) |
| + | -- print(p.t) |
| | | |
| return MapNodesTable | | return MapNodesTable |