mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
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:
@@ -7,16 +7,15 @@
|
||||
#define PRIDE_ALPHA 60
|
||||
|
||||
/obj/effect/turf_decal/tile/Initialize(mapload)
|
||||
if(SSevents.holidays)
|
||||
if (SSevents.holidays[APRIL_FOOLS])
|
||||
color = "#[random_short_color()]"
|
||||
else if (SSevents.holidays[PRIDE_WEEK])
|
||||
var/datum/holiday/pride_week/pride_week = SSevents.holidays[PRIDE_WEEK]
|
||||
color = pride_week.get_floor_tile_color(src)
|
||||
if (check_holidays(APRIL_FOOLS))
|
||||
color = "#[random_short_color()]"
|
||||
else if (check_holidays(PRIDE_WEEK))
|
||||
var/datum/holiday/pride_week/pride_week = GLOB.holidays[PRIDE_WEEK]
|
||||
color = pride_week.get_floor_tile_color(src)
|
||||
|
||||
// It looks garish at different alphas, and it's not possible to get a
|
||||
// consistent color palette without this.
|
||||
alpha = PRIDE_ALPHA
|
||||
// It looks garish at different alphas, and it's not possible to get a
|
||||
// consistent color palette without this.
|
||||
alpha = PRIDE_ALPHA
|
||||
return ..()
|
||||
|
||||
#undef PRIDE_ALPHA
|
||||
@@ -580,7 +579,7 @@
|
||||
icon_state = "trimline_box"
|
||||
|
||||
/obj/effect/turf_decal/trimline/Initialize(mapload)
|
||||
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
|
||||
if(check_holidays(APRIL_FOOLS))
|
||||
color = "#[random_short_color()]"
|
||||
. = ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user