SPECIES NUKING 2023: Head flags 3 & Knuckles: Fixes some growing pains with head flags (#76440)

## About The Pull Request

Fixes https://github.com/tgstation/tgstation/issues/76422
This was caused by me somehow not using the wrapper there and not
noticing it

Also fixes hair gradients and facial hair gradients. I am pretty sure
they were uhh, being hidden behind the actual hair/facial hair. Oops.

Also also fixes spawning yourself as a human as admin and getting random
hair colors. That was just a failure to update the icon after updating
everything, I think?

Additionally, to totally babyproof all of this, ensures that head_flags
involved stuff gets applied AFTER species by creating a new preference
priority, and uses two separate wrappers to apply gradient style and
color.

Here's this absolute hellspawn to prove that everything works.

![image](https://github.com/tgstation/tgstation/assets/82850673/7ed29a68-cb60-4b28-996c-3be0e7331be8)

![image](https://github.com/tgstation/tgstation/assets/82850673/e57128be-0d7c-46ad-90dd-ee25981d0fea)

![image](https://github.com/tgstation/tgstation/assets/82850673/5c3619a8-fe6f-42b3-9fdc-12277d568e8d)

![image](https://github.com/tgstation/tgstation/assets/82850673/fdd13000-2220-47ad-8e02-44bc75a4a907)

Sorry for being so damn good at breaking this codebase.

## Why It's Good For The Game

Bugs are bad they make you mad

## Changelog

🆑
fix: Hair and facial hair gradients work again now
fix: Facial hair colors apply properly again
fix: Admin spawned characters will get hair color preferences applied
properly
/🆑
This commit is contained in:
ChungusGamer666
2023-07-01 09:15:25 -03:00
committed by GitHub
parent f25571e8e6
commit d85e44c69c
9 changed files with 117 additions and 57 deletions
+4 -2
View File
@@ -42,7 +42,9 @@
if(!do_after(user, 3 SECONDS, target))
return
if(beard_or_hair == "Hair")
human_target.set_hair_gradient(new_grad_style, new_grad_color, update = TRUE)
human_target.set_hair_gradient_style(new_grad_style, update = FALSE)
human_target.set_hair_gradient_color(new_grad_color, update = TRUE)
else
human_target.set_facial_hair_gradient(new_grad_style, new_grad_color, update = TRUE)
human_target.set_facial_hair_gradient_style(new_grad_style, update = FALSE)
human_target.set_facial_hair_gradient_color(new_grad_color, update = TRUE)
playsound(src, 'sound/effects/spray.ogg', 10, vary = TRUE)