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.
This commit is contained in:
GoldenAlpharex
2021-12-03 20:31:42 +00:00
committed by GitHub
parent cfa6bf7583
commit 4d2a074a1a
+4 -2
View File
@@ -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.