Module:CurrentNOISZSLEvent

From NOISZ Wiki

This module is meant to be used with EventCycleTime as an input; that module inputs how many seconds we are into a 10-week event cycle to determine which event is currently running, as it's the same order: LUNATIC MAINFRAME -> Attitude Mint -> Blue Moon -> BLACK CAT BLASTER -> NUCLEAR DRIP. This returns a string that contains all information about the current event, in lieu of a table.


local capiunto = require 'capiunto'
local p = {}

function p.main(frame)

-- args still needed so this module can receive cyclestart if it's changed
local args = frame:getParent().args

-- This calls the eventCycleTime template, but uses the cyclestart argument received by this module to adjust it
local eventCycleTime = tonumber(frame:expandTemplate({ title = 'eventCycleTime', cyclestart = {cyclestart = args.recursivecyclestart} }))
local CurrentEvent = {}

if eventCycleTime < 0 then currentEvent = "No event is currently running."
elseif eventCycleTime < 1209600 then currentEvent = "LUNATIC MAINFRAME#Joker#[https://twitter.com/Taimeshi_731 @Taimeshi_731]#05"
elseif eventCycleTime < 2419200 then currentEvent = "Attitude Mint#Sera Hoshikawa#[https://twitter.com/debaa_nyan @debaa_nyan]#01"
elseif eventCycleTime < 3628800 then currentEvent = "Blue Moon#Grace Kamenashi#[https://twitter.com/daihu9san @daihu9san]#02"
elseif eventCycleTime < 4838400 then currentEvent = "Black Cat Blaster#Hakuno Nekoda#[https://twitter.com/yotation @yotation]#03"
elseif eventCycleTime < 6048000 then currentEvent = "Nuclear Drip#Sumire Hitori#[https://twitter.com/cute_hospital @cute_hospital]#04"
else currentEvent = "No event is currently running."
end

return currentEvent

end

return p