mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
[READY] New holidays including Thanksgiving and Ramadan (#28054)
* New holidays and weekday helper * Got rid of var/ * Added separate Thanksgivings and removed an indentation on Tuesday * Makes Mother's Day less ambiguous. * Adds Ramadan heck yea * Gives Ramadan a fixer-upper so it is accurate for a good while
This commit is contained in:
committed by
Jordan Brown
parent
37e00d62bd
commit
e48df5338c
@@ -175,10 +175,12 @@ SUBSYSTEM_DEF(events)
|
||||
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
|
||||
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
|
||||
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
|
||||
var/DDD = text2num(time2text(world.timeofday, "DDD")) // get the current weekday
|
||||
var/W = weekdayofthemonth() // is this the first monday? second? etc.
|
||||
|
||||
for(var/H in subtypesof(/datum/holiday))
|
||||
var/datum/holiday/holiday = new H()
|
||||
if(holiday.shouldCelebrate(DD, MM, YY))
|
||||
if(holiday.shouldCelebrate(DD, MM, YY, W, DDD))
|
||||
holiday.celebrate()
|
||||
if(!holidays)
|
||||
holidays = list()
|
||||
|
||||
Reference in New Issue
Block a user