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

Feature: Clown recycler, a new Cmag effect #28233

Merged
merged 9 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
19 changes: 19 additions & 0 deletions code/datums/spells/banana_touch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,22 @@
if(!(iswizard(src) || (mind && mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE))) //Mutations are permanent on non-wizards. Can still be removed by genetics fuckery but not mutadone.
dna.default_blocks.Add(GLOB.clumsyblock)
dna.default_blocks.Add(GLOB.comicblock)

/// Like bananatouched, but intended to be used for funny one-off scenarios which aren't meant to permanently cripple someone's round.
/mob/living/carbon/human/proc/bananatouched_harmless()
to_chat(src, "<font color='red' size='6'>HONK</font>")
Weaken(14 SECONDS)
Stuttering(30 SECONDS)
do_jitter_animation(30 SECONDS)

drop_item_to_ground(shoes, force = TRUE)
drop_item_to_ground(wear_mask, force = TRUE)
drop_item_to_ground(w_uniform, force = TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/civilian/clown/nodrop, ITEM_SLOT_JUMPSUIT, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/nodrop, ITEM_SLOT_SHOES, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clown_hat/nodrop, ITEM_SLOT_MASK, TRUE, TRUE)
Toastical marked this conversation as resolved.
Show resolved Hide resolved

dna.SetSEState(GLOB.clumsyblock, TRUE, TRUE)
dna.SetSEState(GLOB.comicblock, TRUE, TRUE)
singlemutcheck(src, GLOB.clumsyblock, MUTCHK_FORCED)
singlemutcheck(src, GLOB.comicblock, MUTCHK_FORCED)
Toastical marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 29 additions & 2 deletions code/game/machinery/recycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@
. = ..()
. += "<span class='notice'>The power light is [(stat & NOPOWER) ? "<b>off</b>" : "<b>on</b>"]."
. += "The operation light is [emergency_mode ? "<b>off</b>. [src] has detected a forbidden object with its sensors, and has shut down temporarily." : "<b>on</b>. [src] is active."]"
. += "The safety sensor light is [emagged ? "<b>off</b>!" : "<b>on</b>."]</span>"
if(HAS_TRAIT(src, TRAIT_CMAGGED))
. += "The safety sensor light is <font color=red>R</font><font color=green>G</font><font color=blue>B</font>.</span>"
else
. += "The safety sensor light is [emagged ? "<b>off</b>!" : "<b>on</b>."]</span>"
. += "The recycler current accepts items from [dir2text(eat_dir)]."

/obj/machinery/recycler/power_change()
Expand Down Expand Up @@ -77,9 +80,23 @@
if(default_unfasten_wrench(user, I, time = 6 SECONDS))
return TRUE


/obj/machinery/recycler/cmag_act(mob/user)
if(emagged)
to_chat(user, "<span class='warning'>The board is completely fried.</span>")
return FALSE
if(!HAS_TRAIT(src, TRAIT_CMAGGED))
ADD_TRAIT(src, TRAIT_CMAGGED, CLOWN_EMAG)
if(emergency_mode)
emergency_mode = FALSE
update_icon(UPDATE_ICON_STATE)
playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
to_chat(user, "<span class='notice'>You use the jestographic sequencer on [src].</span>")
return TRUE

/obj/machinery/recycler/emag_act(mob/user)
if(HAS_TRAIT(src, TRAIT_CMAGGED))
to_chat(user, "<span class='warning'>The access panel is coated in yellow ooze...</span>")
return FALSE
if(!emagged)
emagged = TRUE
if(emergency_mode)
Expand Down Expand Up @@ -127,6 +144,8 @@
else if(isliving(AM))
if(emagged)
crush_living(AM)
else if(HAS_TRAIT(src, TRAIT_CMAGGED))
bananafication(AM)
else
emergency_stop(AM)
else if(isitem(AM))
Expand Down Expand Up @@ -165,6 +184,14 @@
emergency_mode = FALSE
update_icon(UPDATE_ICON_STATE)

/obj/machinery/recycler/proc/bananafication(mob/living/L)
L.loc = loc
if(!iscarbon(L))
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
var/mob/living/carbon/human/victim = L
victim.bananatouched_harmless()

/obj/machinery/recycler/proc/crush_living(mob/living/L)

L.loc = loc
Expand Down