Module:Weather
From Paw Borough Wiki
Documentation for this module may be created at Module:Weather/doc
local p = {}
function p.getWeather(weather)
local switch = {
["Sunny"] = "[[File:SunnyIcon.png]]", --
["PartlyCloudy"] = "[[File:PartlyCloudyIcon.png]]", --
["Snowy"] = "[[File:SnowyIcon.png]]", --
["Cloudy"] = "[[File:CloudyIcon.png]]", --
["Rainy"] = "[[File:RainyIcon.png]]", --
}
return switch[weather]
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 weather = frame:getParent().args[1]
return p.getWeather(weather)
end
return p
