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

Fixes spray can double menu #27944

Merged
merged 4 commits into from
Jan 22, 2025
Merged
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
15 changes: 8 additions & 7 deletions code/game/objects/items/crayons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
user.visible_message("<span class='suicide'>[user] is jamming the [name] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS|OXYLOSS

/obj/item/toy/crayon/New()
..()
/obj/item/toy/crayon/Initialize(mapload)
. = ..()
drawtype = pick(pick(graffiti), pick(letters), "rune[rand(1, 8)]")

/obj/item/toy/crayon/activate_self(mob/user)
Expand Down Expand Up @@ -207,7 +207,8 @@
colour = COLOR_PURPLE
dye_color = DYE_PURPLE

/obj/item/toy/crayon/random/New()
/obj/item/toy/crayon/random/Initialize(mapload)
. = ..()
icon_state = pick("crayonred", "crayonorange", "crayonyellow", "crayongreen", "crayonblue", "crayonpurple")
switch(icon_state)
if("crayonred")
Expand All @@ -234,7 +235,6 @@
name = "purple crayon"
colour = COLOR_PURPLE
dye_color = DYE_PURPLE
..()

/obj/item/toy/crayon/black
name = "black crayon"
Expand Down Expand Up @@ -315,8 +315,9 @@
dye_color = null // not technically a crayon, so we're not gonna have it dye stuff in the laundry machine
consumable = FALSE // To stop you from eating spraycans. It's TOO SILLY!

/obj/item/toy/crayon/spraycan/New()
..()
/obj/item/toy/crayon/spraycan/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_ACTIVATE_SELF, TYPE_PROC_REF(/datum, signal_cancel_activate_self))
Toastical marked this conversation as resolved.
Show resolved Hide resolved
update_icon()

/obj/item/toy/crayon/spraycan/activate_self(mob/user)
Expand All @@ -329,7 +330,7 @@
capped = !capped
update_icon()
if("Change Drawing")
..()
update_window(user)
if("Change Color")
colour = tgui_input_color(user,"Please select a paint color.","Spray Can Color")
if(isnull(colour))
Expand Down
Loading