Module:Did you know: Difference between revisions
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..." |
No edit summary |
||
Line 20: | Line 20: | ||
end | end | ||
local combinedFacts = table.concat(selectedFacts, "<br>") | local combinedFacts = table.concat(selectedFacts, "<br>\n") | ||
return combinedFacts | return combinedFacts |
Revision as of 19:45, 3 September 2024
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>\n")
return combinedFacts
end
return p