Module:Soreness: Difference between revisions
From Growtopia
More actions
>Sorenesss No edit summary |
>Sorenesss No edit summary |
||
| Line 2: | Line 2: | ||
function p.test(frame) | function p.test(frame) | ||
local class = {} | local class = {} | ||
table.insert(class, "growsprite") | table.insert(class, "growsprite") | ||
local newwidth = frame.args[2] or "32" | |||
local newwidth = frame.args[2] or "32" | |||
local file = frame.args[1] or "Bingo_Card.png" | local file = frame.args[1] or "Bingo_Card.png" | ||
local imgTag = mw.getCurrentFrame():preprocess("{{filepath:"..file.."}}")..'/revision/latest/scale-to-width-down/scale-to-width-down/'..newwidth | local imgTag = mw.getCurrentFrame():preprocess("{{filepath:"..file.."}}")..'/revision/latest/scale-to-width-down/scale-to-width-down/'..newwidth | ||
return "<span class='" .. table.concat(class, " ") .. "'>" .. imgTag .. "</span>[[Category:AutoPurge]]" | return "<span class='" .. table.concat(class, " ") .. "'>" .. imgTag .. "</span>[[Category:AutoPurge]]" | ||
end | end | ||
return p | return p | ||
Revision as of 13:42, 20 November 2024
Documentation for this module may be created at Module:Soreness/doc
local p = {}
function p.test(frame)
local class = {}
table.insert(class, "growsprite")
local newwidth = frame.args[2] or "32"
local file = frame.args[1] or "Bingo_Card.png"
local imgTag = mw.getCurrentFrame():preprocess("{{filepath:"..file.."}}")..'/revision/latest/scale-to-width-down/scale-to-width-down/'..newwidth
return "<span class='" .. table.concat(class, " ") .. "'>" .. imgTag .. "</span>[[Category:AutoPurge]]"
end
return p