mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Cleanup + TGUI Fix for Hair Dye [NOVA PORT] (#5896)
## About The Pull Request ORIGINAL PR: https://github.com/NovaSector/NovaSector/pull/6818 Cleans up the code for hair dye and fixes the TGUI NtOS bluescreen. ## Why It's Good For The Game Bugs are bad and maintenance for unmaintained code is good. ## Proof Of Testing See below. <details> <summary>Screenshots/Videos</summary> <img width="451" height="172" alt="image" src="https://github.com/user-attachments/assets/36c89512-e375-47f7-9d49-942158acabde" /> <img width="767" height="526" alt="image" src="https://github.com/user-attachments/assets/bb0c5053-437f-4d93-8956-f8164ad9be4d" /> </details> ## Changelog 🆑 xPokee, Hardly fix: Fixes hair dye's gradient dyeing not working /🆑
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
/obj/item/dyespray
|
||||
name = "hair dye spray"
|
||||
desc = "A spray to dye your hair any colors and gradients you'd like." // SKYRAT EDIT - Making the dyespray change hair color
|
||||
desc = "A spray to dye your hair any gradients you'd like."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/cosmetic.dmi'
|
||||
icon_state = "dyespray"
|
||||
|
||||
var/uses = 40 //SKYRAT EDIT ADDITION
|
||||
|
||||
/obj/item/dyespray/attack_self(mob/user)
|
||||
dye(user, user)
|
||||
|
||||
@@ -20,14 +18,11 @@
|
||||
* Arguments:
|
||||
* * target - The mob who we will apply the gradient and gradient color to.
|
||||
*/
|
||||
/* SKYRAT EDIT REMOVAL - MOVED TO MODULAR (modular_skyrat\master_files\code\game\objects\items\dyekit.dm)
|
||||
|
||||
/* BUBBER EDIT - REMOVAL - MOVED TO MODULAR (modular_skyrat\master_files\code\game\objects\items\dyekit.dm)
|
||||
/obj/item/dyespray/proc/dye(mob/target, mob/user)
|
||||
if(!ishuman(target))
|
||||
return
|
||||
|
||||
if(!uses) //SKYRAT EDIT ADDITION
|
||||
return //SKYRAT EDIT ADDITION
|
||||
|
||||
var/mob/living/carbon/human/human_target = target
|
||||
var/list/dyables = list("Hair", "Facial Hair")
|
||||
for(var/obj/item/organ/organ as anything in human_target.organs)
|
||||
@@ -63,8 +58,7 @@
|
||||
if(!user.can_perform_action(src, NEED_DEXTERITY))
|
||||
return
|
||||
|
||||
var/hair_key = what_to_dye == "Hair" ? GRADIENT_HAIR_KEY : GRADIENT_FACIAL_HAIR_KEY
|
||||
var/new_grad_color = tgui_color_picker(user, "Choose a secondary hair color:", "Character Preference", human_target.get_hair_gradient_color(hair_key))
|
||||
var/new_grad_color = tgui_color_picker(user, "Choose a secondary hair color:", "Character Preference", human_target.get_hair_gradient_color())
|
||||
if(!new_grad_color || !user.can_perform_action(src, NEED_DEXTERITY) || !target.IsReachableBy(user))
|
||||
return
|
||||
|
||||
@@ -78,6 +72,7 @@
|
||||
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)
|
||||
*/
|
||||
|
||||
/obj/item/dyespray/proc/dye_organ(mob/living/carbon/human/target, mob/user)
|
||||
var/list/dyables = list()
|
||||
@@ -122,4 +117,3 @@
|
||||
if(QDELETED(selected) || !(selected in target.organs))
|
||||
return
|
||||
overlay.set_dye_color(new_color, selected)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user