Line 5: |
Line 5: |
| local ShipIterator = require("Module:ShipIterator") | | local ShipIterator = require("Module:ShipIterator") |
| local ShipCapabilities = require("Module:ShipCapabilities") | | local ShipCapabilities = require("Module:ShipCapabilities") |
| + | |
| + | local debug = {} |
| + | |
| + | function debugLog(s) |
| + | table.insert(debug, s) |
| + | end |
| + | |
| + | function debugSpan() |
| + | return #debug > 0 and ([[<span style="display:none">]] .. table.concat(debug, "\n") .. [[</span>]]) or "" |
| + | end |
| | | |
| local args = nil | | local args = nil |
Line 212: |
Line 222: |
| repeat | | repeat |
| for _, arg in ipairs(args_) do | | for _, arg in ipairs(args_) do |
| + | debugLog("arg = " .. (arg or "")) |
| local value = interpret_arg(arg) | | local value = interpret_arg(arg) |
| if value then | | if value then |
| + | debugLog("value = " .. (value or "")) |
| table.insert(values, value) | | table.insert(values, value) |
| end | | end |
| end | | end |
| until not sequence or sequence_position > #sequence | | until not sequence or sequence_position > #sequence |
− | return table.concat(values, args.concat or "") | + | return table.concat(values, args.concat or "") .. debugSpan() |
| end | | end |
| end | | end |
Line 232: |
Line 244: |
| mw.log( | | mw.log( |
| Calc.format(nil, { | | Calc.format(nil, { |
− | "!Nagato/Kai Ni", | + | "!Nagato/Kai Ni:_hp = 1", |
− | "!_level = 99", | + | --"!_level = 99", |
− | "!_accuracy = 10", | + | --"!_accuracy = 10", |
− | "!!Destroyer Ro-Class", | + | --"!!Destroyer Ro-Class", |
− | "?test" | + | "?hp" |
| }) | | }) |
| ) | | ) |