Fix Hanukkah (again) and refactor Moth Week and Beer Day (#55532)

* Fix Hanukkah (again) and refactor Moth Week and Beer Day

* Remove unnecessary changes
This commit is contained in:
Jack LeCroy
2020-12-16 17:16:44 -08:00
committed by GitHub
parent fcddd42677
commit 23ee09967e
6 changed files with 97 additions and 119 deletions
+2 -3
View File
@@ -154,15 +154,14 @@ SUBSYSTEM_DEF(events)
if(!CONFIG_GET(flag/allow_holidays))
return // Holiday stuff was not enabled in the config!
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
var/YYYY = text2num(time2text(world.timeofday, "YYYY")) // 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 = time2text(world.timeofday, "DDD") // get the current weekday
var/W = week_of_the_month() // 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, W, DDD))
if(holiday.shouldCelebrate(DD, MM, YYYY, DDD))
holiday.celebrate()
if(!holidays)
holidays = list()