Module:Crafting: Difference between revisions

never mind, that didn't work, testing what happens without attempting to string replace
(We need to get the args of the first argument)
(never mind, that didn't work, testing what happens without attempting to string replace)
Line 199: Line 199:
-- replace "gm4:" with "gm4RP:" then pass to Grid
-- replace "gm4:" with "gm4RP:" then pass to Grid
function p.GridRP( f )
function p.GridRP( f )
local args = f.args[1].args
local args = f.args
if #args == 0 then
if #args == 0 then
args = f:getParent().args
args = f:getParent().args
end
end


for i = 1, #args do
-- for i = 1, #args do
args[i] = string.gsub(args[i], "gm4:", "gm4RP:")
-- args[i] = string.gsub(args[i], "gm4:", "gm4RP:")
end
-- end


return Grid(args, args['width'] or args['Width'] or 3, args['height'] or args['Height'] or 3)
return Grid(args, args['width'] or args['Width'] or 3, args['height'] or args['Height'] or 3)
Bureaucrats, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, translator
2,563

edits