Module:FertilizerWindows: Difference between revisions
From Piñata Journal
More actions
Admin Jeremy (talk | contribs) No edit summary |
Admin Jeremy (talk | contribs) No edit summary |
||
| Line 11: | Line 11: | ||
function p.render(frame) | function p.render(frame) | ||
local count = tonumber(frame.args[1]) or 0 | |||
local count = tonumber(frame.args[ | |||
if count == 0 then | if count == 0 then | ||
Revision as of 20:11, 23 February 2026
Documentation for this module may be created at Module:FertilizerWindows/doc
local p = {}
local icons = {
Red = '[[File:Red fertilizer bag icon.png|20px]]',
Brown = '[[File:Brown fertilizer bag icon.png|20px]]',
Blue = '[[File:Blue fertilizer bag icon.png|20px]]',
Green = '[[File:Green fertilizer bag icon.png|20px]]',
Yellow = '[[File:Yellow fertilizer bag icon.png|20px]]',
Orange = '[[File:Orange fertilizer bag icon.png|20px]]'
}
function p.render(frame)
local count = tonumber(frame.args[1]) or 0
if count == 0 then
return '—'
end
local icon = '[[File:Fertilizer bag icon.png|20px]]'
local out = ''
for i=1,count do
out = out .. icon
end
return out
end
return p