mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 20:11:56 +00:00
* Better hair dye, less pipettes * Reverting a map edit to prevent more conflicts. Also fixing chat message * More consistency changes and fixes * TGUI lists are sexy....... * Better spelling, better code, life good
58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
/obj/item/dyespray
|
|
name = "hair dye spray"
|
|
desc = "A spray to dye hair as well as giving it any gradient you'd like." // SKYRAT EDIT - Making the dyespray change hair color
|
|
w_class = WEIGHT_CLASS_TINY
|
|
icon = 'icons/obj/dyespray.dmi'
|
|
icon_state = "dyespray"
|
|
|
|
var/uses = 40 //SKYRAT EDIT ADDITION
|
|
|
|
/obj/item/dyespray/attack_self(mob/user)
|
|
dye(user, user) // SKYRAT EDIT - Making the dyespray change hair color
|
|
|
|
/obj/item/dyespray/pre_attack(atom/target, mob/living/user, params)
|
|
dye(target, user) // SKYRAT EDIT - Making the dyespray change hair color
|
|
return ..()
|
|
|
|
/**
|
|
* Applies a gradient and a gradient color to a mob.
|
|
*
|
|
* 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)
|
|
/obj/item/dyespray/proc/dye(mob/target)
|
|
if(!ishuman(target))
|
|
return
|
|
|
|
if(!uses) //SKYRAT EDIT ADDITION
|
|
return //SKYRAT EDIT ADDITION
|
|
|
|
var/mob/living/carbon/human/human_target = target
|
|
|
|
var/new_grad_style = input(usr, "Choose a color pattern:", "Character Preference") as null|anything in GLOB.hair_gradients_list
|
|
if(!new_grad_style)
|
|
return
|
|
|
|
var/new_grad_color = input(usr, "Choose a secondary hair color:", "Character Preference",human_target.grad_color) as color|null
|
|
if(!new_grad_color)
|
|
return
|
|
|
|
human_target.grad_style = new_grad_style
|
|
human_target.grad_color = sanitize_hexcolor(new_grad_color)
|
|
to_chat(human_target, span_notice("You start applying the hair dye..."))
|
|
if(!do_after(usr, 3 SECONDS, target))
|
|
return
|
|
playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5)
|
|
human_target.update_hair()
|
|
|
|
//SKYRAT EDIT ADDITION
|
|
uses--
|
|
|
|
/obj/item/dyespray/examine(mob/user)
|
|
. = ..()
|
|
. += "It has [uses] uses left."
|
|
|
|
//SKYRAT EDIT END
|
|
*/
|