Module:Test: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(attempt to port the icontech template)
(this is not ruby)
Line 7: Line 7:
function p.icontech(frame)
function p.icontech(frame)
   frame.args.color = frame.args.color or "228B22"
   frame.args.color = frame.args.color or "228B22"
   frame:expandTemplate{title = 'Icon', args = frame.args}
   return frame:expandTemplate{title = 'Icon', args = frame.args}
end
end


return p
return p

Revision as of 11:58, 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