Module:Did you know: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
local facts = { | local facts = { | ||
"* ... that you can have 15 [[Conditional]] actions per chain?<br>** ... and that [[Event Actions]] up this limit to 30?", | "* ... that you can have 15 [[Conditional]] actions per chain?<br>\n** ... and that [[Event Actions]] up this limit to 30?", | ||
"* ... that Housing is written in Java and compiled with Maven?", | "* ... that Housing is written in Java and compiled with Maven?", | ||
"* ... that creative mode was not available until 2021?", | "* ... that creative mode was not available until 2021?", |
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>\n** ... 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