mirror of
https://github.com/Skyrat-SS13/Skyrat-tg.git
synced 2026-07-15 18:03:46 +01:00
bb70889f6e
3591 individual conflicts Update build.js Update install_node.sh Update byond.js oh my fucking god hat slow huh holy shit we all fall down 2 more I missed 2900 individual conflicts 2700 Individual conflicts replaces yarn file with tg version, bumping us down to 2200-ish Down to 2000 individual conflicts 140 down mmm aaaaaaaaaaaaaaaaaaa not yt 575 soon 900 individual conflicts 600 individual conflicts, 121 file conflicts im not okay 160 across 19 files 29 in 4 files 0 conflicts, compiletime fix time some minor incap stuff missed ticks weird dupe definition stuff missed ticks 2 incap fixes undefs and pie fix Radio update and some extra minor stuff returns a single override no more dupe definitions, 175 compiletime errors Unticked file fix sound and emote stuff honk and more radio stuff
58 lines
2.1 KiB
Plaintext
58 lines
2.1 KiB
Plaintext
/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
|
|
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)
|
|
|
|
/obj/item/dyespray/pre_attack(atom/target, mob/living/user, params)
|
|
dye(target, user)
|
|
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, mob/user)
|
|
if(!ishuman(target))
|
|
return
|
|
|
|
if(!uses) //SKYRAT EDIT ADDITION
|
|
return //SKYRAT EDIT ADDITION
|
|
|
|
var/mob/living/carbon/human/human_target = target
|
|
var/beard_or_hair = tgui_alert(user, "What do you want to dye?", "Character Preference", list("Hair", "Facial Hair"))
|
|
if(!beard_or_hair || !user.can_perform_action(src, NEED_DEXTERITY))
|
|
return
|
|
|
|
var/list/choices = beard_or_hair == "Hair" ? SSaccessories.hair_gradients_list : SSaccessories.facial_hair_gradients_list
|
|
var/new_grad_style = tgui_input_list(user, "Choose a color pattern", "Character Preference", choices)
|
|
if(isnull(new_grad_style))
|
|
return
|
|
if(!user.can_perform_action(src, NEED_DEXTERITY))
|
|
return
|
|
|
|
var/new_grad_color = input(user, "Choose a secondary hair color:", "Character Preference",human_target.grad_color) as color|null
|
|
if(!new_grad_color || !user.can_perform_action(src, NEED_DEXTERITY) || !user.CanReach(target))
|
|
return
|
|
|
|
to_chat(user, span_notice("You start applying the hair dye..."))
|
|
if(!do_after(user, 3 SECONDS, target))
|
|
return
|
|
if(beard_or_hair == "Hair")
|
|
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_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)
|
|
*/
|