Module:Ticks

Revision as of 11:41, 17 May 2025 by Ryan (talk | contribs) (Created page with "local p = {} function p.display(frame) local args = frame:getParent().args local amount = tonumber(args["amount"]) or 0 local seconds = amount * 0.6 local roundedSeconds = math.floor(seconds + 0.5) -- round to nearest whole number return string.format("%d Ticks (%ds)", amount, roundedSeconds) end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Ticks/doc

local p = {}

function p.display(frame)
    local args = frame:getParent().args
    local amount = tonumber(args["amount"]) or 0
    local seconds = amount * 0.6
    local roundedSeconds = math.floor(seconds + 0.5)  -- round to nearest whole number
    return string.format("%d [[Ticks]] (%ds)", amount, roundedSeconds)
end

return p