Jump to content

Module:RandomWIPImage

From Tensura Wiki

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

-- Module:RandomWIPImage
local p = {}

function p.getImage(frame)
    -- List of WIP image filenames (including path if stored in a subdirectory)
    local images = {
        "WIP1.png",
        "WIP2.png",
        "WIP3.png",
        "WIP4.png",
        "WIP5.png",
        "WIP6.png",
        "WIP7.png",
        "WIP8.png",
        "WIP9.png",
        "WIP10.png",
        "WIP11.png",
        "WIP12.png",
    }

    -- Seed the random number generator for better randomness
    math.randomseed(os.time() + tonumber(tostring(math.random()):sub(3, 8)))

    -- Select a random image from the list
    local selected = images[math.random(#images)]

    return selected
end

return p