Module:Did you know

Revision as of 19:44, 3 September 2024 by Noah (talk | contribs) (Created page with "-- This module will handle the fun facts on the main page! -- local p = {} local facts = { "* ... that you can have 15 Conditional actions per chain?<br>** ... and that Event Actions up this limit to 30?", "* ... that Housing is written in Java and compiled with Maven?", "* ... that creative mode was not available until 2021?", "* ... that the developer Connor Linfoot's skin has rainbow wristbands to show his support for the LGBT community?", "* ... that I...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Did you know/doc

-- This module will handle the fun facts on the main page! --

local p = {}

local facts = {
"* ... that you can have 15 [[Conditional]] actions per chain?<br>** ... and that [[Event Actions]] up this limit to 30?",
"* ... that Housing is written in Java and compiled with Maven?",
"* ... that creative mode was not available until 2021?",
"* ... that the developer [[Connor Linfoot]]'s skin has rainbow wristbands to show his support for the LGBT community?",
"* ... that I forgot to add another fact?"
}

function p.getHourlyFacts( frame )
    local timeSeed = math.floor(os.time() / 3600)
    local selectedFacts = {}

    for i = 1, 5 do
        local index = (timeSeed + i) % #facts + 1
        table.insert(selectedFacts, facts[index])
    end

    local combinedFacts = table.concat(selectedFacts, "<br>")

    return combinedFacts
end

return p