Module:Test: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(this is not ruby)
(this kind of default doesnt appear to work, should be doing it in the template that invokes the function)
 
Line 6: Line 6:


function p.icontech(frame)
function p.icontech(frame)
   frame.args.color = frame.args.color or "228B22"
   --frame.args.color = frame.args.color or "228B22"
   return frame:expandTemplate{title = 'Icon', args = frame.args}
   return frame:expandTemplate{title = 'Icon', args = frame.args}
end
end


return p
return p

Latest revision as of 12:25, 1 October 2024

Documentation for this module may be created at Module:Test/doc

local p = {}
function p.main(frame)
  local args = frame.args
  return args[1]..args["sep"]..args[2]
end

function p.icontech(frame)
  --frame.args.color = frame.args.color or "228B22"
  return frame:expandTemplate{title = 'Icon', args = frame.args}
end

return p