Fix halloweens races (#70874)

* Fixes halloween races.
- Fixes a race condition involve checking for holidays befores SSevents is instantiated. Now, holiday checking is done through a helper, which will ensure the holidays list is created and filled before checked.
This commit is contained in:
MrMelbert
2022-10-31 10:01:31 -05:00
committed by GitHub
parent ed55e9ba01
commit a1ab0201ff
35 changed files with 106 additions and 89 deletions
+2 -2
View File
@@ -548,7 +548,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
var/balloon_clusters = 2
/obj/effect/mapping_helpers/ianbirthday/LateInitialize()
if(locate(/datum/holiday/ianbirthday) in SSevents.holidays)
if(check_holidays("Ian's Birthday"))
birthday()
qdel(src)
@@ -616,7 +616,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/mapping_helpers/no_lava)
icon_state = "iansnewyrshelper"
/obj/effect/mapping_helpers/iannewyear/LateInitialize()
if(SSevents.holidays && SSevents.holidays[NEW_YEAR])
if(check_holidays(NEW_YEAR))
fireworks()
qdel(src)