From e700e5c8b17a2f592a069a4a9e7a0512ef98dd62 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Mon, 22 Jun 2026 00:13:13 +0200 Subject: [PATCH] Floor decals are no longer rainbow-colored every round during pride week (#96557) --- code/__DEFINES/colors.dm | 39 ++++++++++++++ code/__HELPERS/events.dm | 30 +++++++++++ code/datums/station_traits/_station_trait.dm | 8 --- code/game/objects/effects/decals/decal.dm | 2 +- .../effects/decals/turfdecal/tilecoloring.dm | 6 +-- code/game/turfs/open/floor/misc_floor.dm | 2 +- code/modules/holiday/holidays.dm | 53 ++++++------------- 7 files changed, 89 insertions(+), 51 deletions(-) diff --git a/code/__DEFINES/colors.dm b/code/__DEFINES/colors.dm index d997a325b4c..37f7793e4e4 100644 --- a/code/__DEFINES/colors.dm +++ b/code/__DEFINES/colors.dm @@ -332,6 +332,45 @@ #define COLOR_PRIDE_BLUE "#42FFF2" #define COLOR_PRIDE_PURPLE "#5D5DFC" +#define PRIDE_FLAG_COLORS list(COLOR_PRIDE_PURPLE, COLOR_PRIDE_BLUE, COLOR_PRIDE_GREEN, COLOR_PRIDE_YELLOW, COLOR_PRIDE_ORANGE, COLOR_PRIDE_RED) + +#define COLOR_LESBIAN_RED "#D62800" +#define COLOR_LESBIAN_ORANGE "#FF9B56" +#define COLOR_LESBIAN_PINK "#D452A6" +#define COLOR_LESBIAN_MAGENTA "#A40062" + +#define LESBIAN_FLAG_COLORS list(COLOR_LESBIAN_MAGENTA, COLOR_LESBIAN_PINK, COLOR_LESBIAN_ORANGE, COLOR_LESBIAN_RED) + +#define COLOR_GAY_GREEN "#078D70" +#define COLOR_GAY_LIGHT_GREEN "#98E8C1" +#define COLOR_GAY_LIGHT_BLUE "#7BADE2" +#define COLOR_GAY_BLUE "#3D1A78" + +#define GAY_MAN_FLAG_COLORS list(COLOR_GAY_BLUE, COLOR_GAY_LIGHT_BLUE, COLOR_GAY_LIGHT_GREEN, COLOR_GAY_GREEN) + +#define COLOR_TRANS_BLUE "#5BCEFA" +#define COLOR_TRANS_PINK "#F5A9B8" + +#define TRANS_FLAG_COLORS list(COLOR_TRANS_PINK, COLOR_WHITE, COLOR_TRANS_PINK, COLOR_TRANS_BLUE) + +#define COLOR_BI_PINK "#D60270" +#define COLOR_BI_PURPLE "#9B4F96" +#define COLOR_BI_BLUE "#0038A8" + +#define BI_FLAG_COLORS list(COLOR_BI_BLUE, COLOR_BI_PURPLE, COLOR_BI_PINK) + +#define COLOR_ACE_BLACK "#292929" +#define COLOR_ACE_GREY "#888888" +#define COLOR_ACE_PURPLE "#800080" + +#define ACE_FLAG_COLORS list(COLOR_ACE_PURPLE, COLOR_WHITE, COLOR_ACE_GREY, COLOR_ACE_BLACK) + +#define COLOR_PAN_MAGENTA "#FF218C" +#define COLOR_PAN_YELLOW "#FFE45E" +#define COLOR_PAN_CYAN "#2CCAFF" + +#define PAN_FLAG_COLORS list(COLOR_PAN_CYAN, COLOR_PAN_YELLOW, COLOR_PAN_MAGENTA) + /// Colors for status/tram/incident displays #define COLOR_DISPLAY_RED "#BE3455" #define COLOR_DISPLAY_ORANGE "#FF9900" diff --git a/code/__HELPERS/events.dm b/code/__HELPERS/events.dm index ad937029026..0a1d871681c 100644 --- a/code/__HELPERS/events.dm +++ b/code/__HELPERS/events.dm @@ -84,4 +84,34 @@ CRASH("Attempted to force event [event_typepath], but the event path could not be found!") addtimer(CALLBACK(our_event, TYPE_PROC_REF(/datum/round_event_control, run_event), FALSE, null, FALSE, cause), duration) +//Request a color in line with the current holiday or station traits of the station (or not if RANDOM/RAINBOW patterns are used. +/proc/request_decoration_colors(atom/thing_to_color, pattern, skip_station_trait = FALSE) + switch(pattern) + if(PATTERN_RANDOM) + return "#[random_short_color()]" + if(PATTERN_RAINBOW) + return get_decoration_color_from_pattern(thing_to_color, PATTERN_DEFAULT, PRIDE_FLAG_COLORS) + + if(!skip_station_trait) + for(var/datum/station_trait/trait in SSstation.station_traits) + var/decal_color = trait.get_decal_color(thing_to_color, pattern || PATTERN_DEFAULT) + if(decal_color) + return decal_color + + for(var/holiday_key in GLOB.holidays) + var/datum/holiday/holiday_real = GLOB.holidays[holiday_key] + if(!holiday_real.holiday_colors) + continue + return holiday_real.get_holiday_colors(thing_to_color, pattern) + +/// Proc to return colors for recoloring atoms based on a pattern and the position of the atom. Primarily used by holidays +/proc/get_decoration_color_from_pattern(atom/thing_to_color, pattern = PATTERN_DEFAULT, list/colors) + if(!length(colors)) + return + switch(pattern) + if(PATTERN_DEFAULT) + return colors[(thing_to_color.y % colors.len) + 1] + if(PATTERN_VERTICAL_STRIPE) + return colors[(thing_to_color.x % colors.len) + 1] + #undef UNLIT_AREA_BRIGHTNESS diff --git a/code/datums/station_traits/_station_trait.dm b/code/datums/station_traits/_station_trait.dm index b937aa3082c..99b5dfc158d 100644 --- a/code/datums/station_traits/_station_trait.dm +++ b/code/datums/station_traits/_station_trait.dm @@ -71,14 +71,6 @@ GLOBAL_LIST_EMPTY(lobby_station_traits) qdel(src) -/// Called by decals if they can be colored, to see if we got some cool colors for them. Only takes the first station trait -/proc/request_station_colors(atom/thing_to_color, pattern) - for(var/datum/station_trait/trait in SSstation.station_traits) - var/decal_color = trait.get_decal_color(thing_to_color, pattern || PATTERN_DEFAULT) - if(decal_color) - return decal_color - return null - /// Return a color for the decals, if any /datum/station_trait/proc/get_decal_color(thing_to_color, pattern) return diff --git a/code/game/objects/effects/decals/decal.dm b/code/game/objects/effects/decals/decal.dm index b8069b0ab41..1839ec498b9 100644 --- a/code/game/objects/effects/decals/decal.dm +++ b/code/game/objects/effects/decals/decal.dm @@ -70,7 +70,7 @@ // If the tile uses holiday colors, apply them here if(use_holiday_colors) - var/custom_color = request_station_colors(src, pattern) || request_holiday_colors(src, pattern) + var/custom_color = request_decoration_colors(src, pattern) if(custom_color) color = custom_color alpha = DECAL_ALPHA diff --git a/code/game/objects/effects/decals/turfdecal/tilecoloring.dm b/code/game/objects/effects/decals/turfdecal/tilecoloring.dm index 737219f00a9..9e7438660d3 100644 --- a/code/game/objects/effects/decals/turfdecal/tilecoloring.dm +++ b/code/game/objects/effects/decals/turfdecal/tilecoloring.dm @@ -143,7 +143,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/dark) color = COLOR_RED /obj/effect/turf_decal/tile/holiday/Initialize(mapload) - color = request_holiday_colors(src, pattern) + color = request_decoration_colors(src, pattern, skip_station_trait = TRUE) alpha = DECAL_ALPHA return ..() @@ -176,7 +176,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/holiday/random) /obj/effect/turf_decal/trimline/tram/filled/corner/Initialize(mapload) if(use_holiday_colors) - var/current_holiday_color = request_holiday_colors(src, pattern) + var/current_holiday_color = request_decoration_colors(src, pattern) if(current_holiday_color) color = current_holiday_color alpha = DECAL_ALPHA @@ -186,7 +186,7 @@ TILE_DECAL_SUBTYPE_HELPER(/obj/effect/turf_decal/tile/holiday/random) /obj/effect/turf_decal/trimline/tram/filled/line/Initialize(mapload) if(use_holiday_colors) - var/current_holiday_color = request_holiday_colors(src, pattern) + var/current_holiday_color = request_decoration_colors(src, pattern) if(current_holiday_color) color = current_holiday_color alpha = DECAL_ALPHA diff --git a/code/game/turfs/open/floor/misc_floor.dm b/code/game/turfs/open/floor/misc_floor.dm index ae5ae6c3e9d..9ce464c68c7 100644 --- a/code/game/turfs/open/floor/misc_floor.dm +++ b/code/game/turfs/open/floor/misc_floor.dm @@ -167,7 +167,7 @@ /turf/open/floor/noslip/tram/Initialize(mapload) . = ..() - var/current_holiday_color = request_station_colors(src, PATTERN_VERTICAL_STRIPE) || request_holiday_colors(src, PATTERN_VERTICAL_STRIPE) + var/current_holiday_color = request_decoration_colors(src, PATTERN_VERTICAL_STRIPE) if(current_holiday_color) color = current_holiday_color else diff --git a/code/modules/holiday/holidays.dm b/code/modules/holiday/holidays.dm index 3e6d68cbffd..4342b80f000 100644 --- a/code/modules/holiday/holidays.dm +++ b/code/modules/holiday/holidays.dm @@ -86,30 +86,8 @@ GLOBAL_LIST_INIT(holiday_mail, list()) return FALSE -/// Procs to return holiday themed colors for recoloring atoms -/datum/holiday/proc/get_holiday_colors(atom/thing_to_color, pattern = holiday_pattern) - if(!holiday_colors) - return - switch(pattern) - if(PATTERN_DEFAULT) - return holiday_colors[(thing_to_color.y % holiday_colors.len) + 1] - if(PATTERN_VERTICAL_STRIPE) - return holiday_colors[(thing_to_color.x % holiday_colors.len) + 1] - -/proc/request_holiday_colors(atom/thing_to_color, pattern) - switch(pattern) - if(PATTERN_RANDOM) - return "#[random_short_color()]" - if(PATTERN_RAINBOW) - var/datum/holiday/pride_week/rainbow_datum = new() - return rainbow_datum.get_holiday_colors(thing_to_color, PATTERN_DEFAULT) - if(!length(GLOB.holidays)) - return - for(var/holiday_key in GLOB.holidays) - var/datum/holiday/holiday_real = GLOB.holidays[holiday_key] - if(!holiday_real.holiday_colors) - continue - return holiday_real.get_holiday_colors(thing_to_color, pattern || holiday_real.holiday_pattern) +/datum/holiday/proc/get_holiday_colors(atom/thing_to_color, pattern) + return get_decoration_color_from_pattern(thing_to_color, pattern || holiday_pattern, holiday_colors) // The actual holidays @@ -317,9 +295,9 @@ GLOBAL_LIST_INIT(holiday_mail, list()) begin_month = APRIL holiday_hat = /obj/item/clothing/head/rasta holiday_colors = list( - COLOR_ETHIOPIA_GREEN, - COLOR_ETHIOPIA_YELLOW, COLOR_ETHIOPIA_RED, + COLOR_ETHIOPIA_YELLOW, + COLOR_ETHIOPIA_GREEN, ) holiday_mail = list(/obj/item/cigarette/rollie/cannabis) @@ -467,14 +445,7 @@ GLOBAL_LIST_INIT(holiday_mail, list()) // Stonewall was June 28th, this captures its week. begin_day = 23 end_day = 29 - holiday_colors = list( - COLOR_PRIDE_PURPLE, - COLOR_PRIDE_BLUE, - COLOR_PRIDE_GREEN, - COLOR_PRIDE_YELLOW, - COLOR_PRIDE_ORANGE, - COLOR_PRIDE_RED, - ) + holiday_colors = PRIDE_FLAG_COLORS holiday_mail = list( /obj/item/bedsheet/rainbow, /obj/item/clothing/accessory/pride, @@ -490,6 +461,12 @@ GLOBAL_LIST_INIT(holiday_mail, list()) /obj/item/toy/crayon/rainbow, ) +/datum/holiday/pride_week/New() + . = ..() + if(prob(30)) + return + holiday_colors = pick(LESBIAN_FLAG_COLORS, GAY_MAN_FLAG_COLORS, TRANS_FLAG_COLORS, BI_FLAG_COLORS, ACE_FLAG_COLORS, PAN_FLAG_COLORS) + // JULY /datum/holiday/doctor @@ -526,11 +503,11 @@ GLOBAL_LIST_INIT(holiday_mail, list()) no_mail_holiday = TRUE holiday_hat = /obj/item/clothing/head/cowboy/brown holiday_colors = list( + COLOR_WHITE, + COLOR_OLD_GLORY_RED, + COLOR_WHITE, + COLOR_OLD_GLORY_RED, COLOR_OLD_GLORY_BLUE, - COLOR_OLD_GLORY_RED, - COLOR_WHITE, - COLOR_OLD_GLORY_RED, - COLOR_WHITE, )