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
@@ -28,7 +28,7 @@
qdel(src)
return TRUE
if(SEND_SIGNAL(target.mind, COMSIG_MINDSHIELD_IMPLANTED, user) & COMPONENT_MINDSHIELD_DECONVERTED)
if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
if(prob(1) || check_holidays(APRIL_FOOLS))
target.say("I'm out! I quit! Whose kidneys are these?", forced = "They're out! They quit! Whose kidneys do they have?")
ADD_TRAIT(target, TRAIT_MINDSHIELD, IMPLANT_TRAIT)