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 |
||
(5 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
local facts = { | local facts = { | ||
" | |||
" | "you can have 15 [[Conditional]] actions per chain?<br>\n** ... and that [[Event Actions]] up this limit to 30?", | ||
" | |||
" | "Housing is written in Java and compiled with Maven?", | ||
"* ... that | |||
"creative mode was not available until 2021?", | |||
"the developer [[Connor Linfoot]]'s skin has rainbow wristbands to show his support for the LGBT community?", | |||
"most Housing updates are released on Monday?", | |||
"[[The Carpenter]] has a [https://hypixel.net/members/367526/ forums account]?", | |||
"[[The Carpenter]] has no confirmed gender?", | |||
"[[The Carpenter]] was born in 2015?", | |||
"the virtual idol Hatsune Miku has an [[NPC]] skin?", | |||
"the New York Times Magazine partned with Hypixel to create a [[Featured worlds|featured world]] in Housing?", | |||
"before players had access to creative mode, blocks had to be earned from the now removed Mystery Boxes?", | |||
"the [[Skull Packs|Food Pack]] refers to OrieOh instead of Oreos to avoid copyright infringement?", | |||
"[[Hykia]] used to be called Hykea but was changed after full release?", | |||
"the [[NPC]] skin named after Abraham Lincoln is an ice-cream cone?", | |||
"there used to be [[skulls]] unlocked through seasonal Mystery Boxes?", | |||
"players with the YouTube rank are able to add a password to their house?<br>\n** ... and that if it's still public, you can bypass it by using {{Command|house random}}?", | |||
"the developer [[Connor Linfoot]] is British?", | |||
"Mystery Dust used to be called ''Credits''?", | |||
"Hypixel posts Housing showcases on their [https://tiktok.com/@hypixel TikTok] and [https://www.youtube.com/@Hypixel/shorts YouTube] channels?", | |||
"players with the YouTube Rank can give 25 [[Cookies]]?", | |||
"[[Housing]]'s update artwork was drawn by Thomas Frick, an artist for Hytale?", | |||
"the developer [[Connor Linfoot]] created the most popular SMP crates plugin, Crates Plus?", | |||
"you can't be sent to Limbo while in the [[House Browser|Housing Browser]]?", | |||
"the shortest [[furniture]] name is the Rug at 3 characters long?", | |||
"the longest [[furniture]] name is the High-Backed Dining Chair at 24 characters long?", | |||
"the hot air balloon used in the default Housing [[Themes|theme]] is also used in SkyBlock?", | |||
"the hot air balloon used in the default Housing [[Themes|theme]] is no longer in the Main Lobby, despite it having been in all of them since 2015?", | |||
"[[Housing]] existed on Hypixel China before it shut down?", | |||
"[[Housing+]] could have offered early access to new features?", | |||
} | } | ||
function p.getHourlyFacts( frame ) | function p.getHourlyFacts( frame ) | ||
local timeSeed = math.floor(os.time() | local timeSeed = math.floor(os.time()) | ||
local selectedFacts = {} | local selectedFacts = {} | ||
-- Shuffling | |||
for i = #facts, 2, -1 do | |||
local j = math.random(1, i) | |||
facts[i], facts[j] = facts[j], facts[i] | |||
end | |||
for i = 1, 5 do | for i = 1, 5 do | ||
local index = (timeSeed + i) % #facts + 1 | local index = (timeSeed + i) % #facts + 1 | ||
table.insert(selectedFacts, facts[index]) | table.insert(selectedFacts, "* ... that " .. facts[index]) | ||
end | end | ||
local combinedFacts = table.concat(selectedFacts, "<br>") | local combinedFacts = table.concat(selectedFacts, "<br>\n") | ||
return combinedFacts | return combinedFacts |
Latest revision as of 09:25, 13 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 = {
"you can have 15 [[Conditional]] actions per chain?<br>\n** ... and that [[Event Actions]] up this limit to 30?",
"Housing is written in Java and compiled with Maven?",
"creative mode was not available until 2021?",
"the developer [[Connor Linfoot]]'s skin has rainbow wristbands to show his support for the LGBT community?",
"most Housing updates are released on Monday?",
"[[The Carpenter]] has a [https://hypixel.net/members/367526/ forums account]?",
"[[The Carpenter]] has no confirmed gender?",
"[[The Carpenter]] was born in 2015?",
"the virtual idol Hatsune Miku has an [[NPC]] skin?",
"the New York Times Magazine partned with Hypixel to create a [[Featured worlds|featured world]] in Housing?",
"before players had access to creative mode, blocks had to be earned from the now removed Mystery Boxes?",
"the [[Skull Packs|Food Pack]] refers to OrieOh instead of Oreos to avoid copyright infringement?",
"[[Hykia]] used to be called Hykea but was changed after full release?",
"the [[NPC]] skin named after Abraham Lincoln is an ice-cream cone?",
"there used to be [[skulls]] unlocked through seasonal Mystery Boxes?",
"players with the YouTube rank are able to add a password to their house?<br>\n** ... and that if it's still public, you can bypass it by using {{Command|house random}}?",
"the developer [[Connor Linfoot]] is British?",
"Mystery Dust used to be called ''Credits''?",
"Hypixel posts Housing showcases on their [https://tiktok.com/@hypixel TikTok] and [https://www.youtube.com/@Hypixel/shorts YouTube] channels?",
"players with the YouTube Rank can give 25 [[Cookies]]?",
"[[Housing]]'s update artwork was drawn by Thomas Frick, an artist for Hytale?",
"the developer [[Connor Linfoot]] created the most popular SMP crates plugin, Crates Plus?",
"you can't be sent to Limbo while in the [[House Browser|Housing Browser]]?",
"the shortest [[furniture]] name is the Rug at 3 characters long?",
"the longest [[furniture]] name is the High-Backed Dining Chair at 24 characters long?",
"the hot air balloon used in the default Housing [[Themes|theme]] is also used in SkyBlock?",
"the hot air balloon used in the default Housing [[Themes|theme]] is no longer in the Main Lobby, despite it having been in all of them since 2015?",
"[[Housing]] existed on Hypixel China before it shut down?",
"[[Housing+]] could have offered early access to new features?",
}
function p.getHourlyFacts( frame )
local timeSeed = math.floor(os.time())
local selectedFacts = {}
-- Shuffling
for i = #facts, 2, -1 do
local j = math.random(1, i)
facts[i], facts[j] = facts[j], facts[i]
end
for i = 1, 5 do
local index = (timeSeed + i) % #facts + 1
table.insert(selectedFacts, "* ... that " .. facts[index])
end
local combinedFacts = table.concat(selectedFacts, "<br>\n")
return combinedFacts
end
return p