Module:DamagePatch: Difference between revisions

no edit summary
(Created page with "require('Module:CommonFunctions'); local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame) -- Collect arguments from the old table. local input_args = split(mw.text.unstrip(args.orig), '|') local old_args = {} for k, v in ipairs(input_args) do local old_arg = split(v, '=') if not old_arg[2] then old_args[k] = v else old_args[old_arg[1]] = old_...")
 
No edit summary
Line 7: Line 7:


     -- Collect arguments from the old table.
     -- Collect arguments from the old table.
     local input_args = split(mw.text.unstrip(args.orig), '|')
     local input_args = split(mw.text.unstrip(args[1]), '|')
     local old_args = {}
     local old_args = {}
     for k, v in ipairs(input_args) do
     for k, v in ipairs(input_args) do
Line 18: Line 18:
     end
     end


     args.orig = nil
     args[1] = nil
     local new_args = table.deep_copy(old_args)
     local new_args = table.deep_copy(old_args)