From 4d2a074a1a05e576a05216c4befffae443632ff0 Mon Sep 17 00:00:00 2001 From: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Date: Fri, 3 Dec 2021 15:31:42 -0500 Subject: [PATCH] Ghosts can have colorful hair again! (#63129) The PR that updated the codebase to no longer use legacy colors didn't check this specific proc, which is to my knowledge only used by ghosts lightening their hair color. That's it. --- code/modules/mob/dead/observer/observer.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 53fe82d54dc..2eea45ea043 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -240,9 +240,11 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) * Increase the brightness of a color by calculating the average distance between the R, G and B values, * and maximum brightness, then adding 30% of that average to R, G and B. * - * I'll make this proc global and move it to its own file in a future update. |- Ricotez + * I'll make this proc global and move it to its own file in a future update. |- Ricotez - UPDATE: They never did :( */ /mob/proc/brighten_color(input_color) + if(input_color[1] == "#") + input_color = copytext(input_color, 2) // Removing the # at the beginning. var/r_val var/b_val var/g_val @@ -270,7 +272,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) if(b_val > 255) b_val = 255 - return copytext(rgb(r_val, g_val, b_val), 2) + return "#" + copytext(rgb(r_val, g_val, b_val), 2) /* Transfer_mind is there to check if mob is being deleted/not going to have a body.