Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a salve that allows elzuose to change color #2995

Merged
merged 3 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions code/game/objects/items/dyekit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,30 @@
return
playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5)
human_target.update_hair()

/obj/item/colorsalve
name = "Elzuose color salve"
desc = "A Kalixcian beauty product for Elzuose that comes in the form of a salve packaged with various color additives. Used to temporarily change the pigment color of light emitting cells in the skin, requiring an extensive amount of time to prepare and apply. Wears off after a few hours."
icon = 'icons/obj/dyespray.dmi'
icon_state = "colorsalve"

/obj/item/colorsalve/attack_self(mob/living/user)
if(!iselzuose(user))
return

var/mob/living/carbon/human/H = user
var/datum/species/elzuose/species_datum = H.dna.species
// select new color
var/new_etherealcolor = input(user, "Choose your Elzuose color:", "Character Preference", species_datum.default_color) as color|null
if(new_etherealcolor)
var/temp_hsv = RGBtoHSV(new_etherealcolor)
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#505050")[3]) // elzu colors should be bright ok??
if(!do_after(usr, 30 SECONDS, user))
return
playsound(src, 'sound/effects/ointment.ogg', 5, TRUE, 5)
species_datum.default_color = sanitize_hexcolor(new_etherealcolor, 6, TRUE)
species_datum.current_color = species_datum.health_adjusted_color(user, species_datum.default_color)
species_datum.spec_updatehealth(user)
user.visible_message(span_notice("[user] applies the salve, changing [user.p_their()] color to [new_etherealcolor]"))
else
to_chat(user, span_danger("Invalid color. Your color is not bright enough."))
4 changes: 4 additions & 0 deletions code/modules/client/loadout/loadout_general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@
display_name = "hair dye"
path = /obj/item/dyespray

/datum/gear/colorsalve
display_name = "Elzuose color salve"
path = /obj/item/colorsalve

/datum/gear/tablebell
display_name = "table bell, brass"
path = /obj/item/table_bell/brass
Expand Down
Binary file modified icons/obj/dyespray.dmi
Binary file not shown.
Loading