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 16:01:31 +01:00
committed by GitHub
parent ed55e9ba01
commit a1ab0201ff
35 changed files with 106 additions and 89 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
/// Returns a fresh piece of paper
/obj/item/paper_bin/proc/generate_paper()
var/obj/item/paper/paper = new papertype
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
if(check_holidays(APRIL_FOOLS))
if(prob(30))
paper.add_raw_text("<font face=\"[CRAYON_FONT]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>")
paper.AddElement(/datum/element/honkspam)