Line 1: |
Line 1: |
| local getArgs = require('Module:GetArgs') | | local getArgs = require('Module:GetArgs') |
− | local U = require('Module:Core')
| + | local format = require('Module:StringInterpolation').format |
− | local format = require('Module:Core').format | |
| local EnemyShip = require("Module:EnemyShip") | | local EnemyShip = require("Module:EnemyShip") |
| local ShipBattleCardKai = require("Module:ShipBattleCardKai") | | local ShipBattleCardKai = require("Module:ShipBattleCardKai") |
Line 106: |
Line 105: |
| return format{templates.table_header, map_id = map_id} .. 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 |
| + | |
| + | local MapNodesTable = {} |
| | | |
− | function templates.format(formatstring, frame) | + | function MapNodesTable.format(frame, args_) |
− | local _args = frame-- or getArgs{frame = frame:getParent()} | + | local args = args_ or getArgs{frame = frame:getParent()} |
− | local map_id = _args | + | 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_id, 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) | | -- print(p.t) |
| | | |
− | return templates | + | return MapNodesTable |