Module:Season: Difference between revisions
From Paw Borough Wiki
(Created page with "local p = {} function p.getSeason(season) local switch = { ["Winter"] = "File:WinterIcon.png", -- ["Summer"] = "File:SummerIcon.png", -- ["Fall"] = "File:FallIcon.png", -- ["Autumn"] = "File:FallIcon.png", -- ["Spring"] = "File:SpringIcon.png", -- } end -- Main function that calls getTheme with a passed-in theme argument function p.main(frame) -- The theme parameter is fir...") |
(No difference)
|
Revision as of 17:10, 29 September 2023
Documentation for this module may be created at Module:Season/doc
local p = {}
function p.getSeason(season)
local switch = {
["Winter"] = "[[File:WinterIcon.png]]", --
["Summer"] = "[[File:SummerIcon.png]]", --
["Fall"] = "[[File:FallIcon.png]]", --
["Autumn"] = "[[File:FallIcon.png]]", --
["Spring"] = "[[File:SpringIcon.png]]", --
}
end
-- Main function that calls getTheme with a passed-in theme argument
function p.main(frame)
-- The theme parameter is first positional, or nil if unspecified.
local season = frame:getParent().args[1]
return p.getSeason(season)
end
return p
