Line 6: |
Line 6: |
| | | |
| local U = require('Module:Core') | | local U = require('Module:Core') |
| + | local getArgs = require('Module:Arguments').getArgs |
| | | |
| local template = { | | local template = { |
Line 13: |
Line 14: |
| } | | } |
| | | |
− | local function render(frame, shipClass, remodelSuffix, notes, coloring, ...) | + | local function GenerateTable(frame) |
| + | local shipClass = frame.args[1] |
| + | local remodelSuffix = frame.args[2] |
| + | local notes = frame.args[3] |
| + | local coloring = frame.args[4] |
| + | |
| + | return render(shipClass, remodelSuffix, notes, coloring) |
| + | end |
| + | |
| + | local function render(shipClass, remodelSuffix, notes, coloring, ...) |
| local shipClass = shipClass or frame.args[1] or "??" | | local shipClass = shipClass or frame.args[1] or "??" |
| local success, data = U.loadData("Data/Ship") | | local success, data = U.loadData("Data/Ship") |
Line 56: |
Line 66: |
| | | |
| local function test() | | local function test() |
− | mw.log(render(nil, "Destroyer", {"B Kai", "D Kai", "Mk.II", "Zwei"}, | + | mw.log(render("Destroyer", {"B Kai", "D Kai", "Mk.II", "Zwei"}, |
| {"|Mikazuki/Kai_notes = Can equip [[Daihatsu Landing Craft|Daihatsu]]", | | {"|Mikazuki/Kai_notes = Can equip [[Daihatsu Landing Craft|Daihatsu]]", |
| "|Mutsuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]]", | | "|Mutsuki/Kai Ni_notes = 2nd remodel. Can equip [[Daihatsu Landing Craft|Daihatsu]]", |