From a34e81d42613d5bf764ef4ac84a86e6a8bad23bf Mon Sep 17 00:00:00 2001 From: wesoda25 <37246588+wesoda25@users.noreply.github.com> Date: Fri, 13 Mar 2020 20:58:18 -0400 Subject: [PATCH] Adds a couple mood events (#49918) * bang! * Dr. Joseph-Ignace ********* --- code/datums/components/gunpoint.dm | 3 +++ code/datums/mood_events/generic_negative_events.dm | 9 ++++++++- code/game/objects/structures/electricchair.dm | 6 ++++++ code/game/objects/structures/guillotine.dm | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/code/datums/components/gunpoint.dm b/code/datums/components/gunpoint.dm index 31a01809204..e454b0921c3 100644 --- a/code/datums/components/gunpoint.dm +++ b/code/datums/components/gunpoint.dm @@ -42,6 +42,7 @@ target.do_alert_animation(target) target.playsound_local(target.loc, 'sound/machines/chime.ogg', 50, TRUE) + SEND_SIGNAL(target, COMSIG_ADD_MOOD_EVENT, "gunpoint", /datum/mood_event/gunpoint) addtimer(CALLBACK(src, .proc/update_stage, 2), GUNPOINT_DELAY_STAGE_2) @@ -97,6 +98,7 @@ cancel() /datum/component/gunpoint/proc/trigger_reaction() + SEND_SIGNAL(target, COMSIG_CLEAR_MOOD_EVENT, "gunpoint") if(point_of_no_return) return point_of_no_return = TRUE @@ -124,6 +126,7 @@ shooter.visible_message("[shooter] breaks [shooter.p_their()] aim on [target]!", \ "You are no longer aiming [weapon] at [target].", target) to_chat(target, "[shooter] breaks [shooter.p_their()] aim on you!") + SEND_SIGNAL(target, COMSIG_CLEAR_MOOD_EVENT, "gunpoint") qdel(src) /datum/component/gunpoint/proc/flinch(attacker, damage, damagetype, def_zone) diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index 857fb6e45ed..613df40a68b 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -212,6 +212,14 @@ mood_change = -8 timeout = 3 MINUTES +/datum/mood_event/deaths_door + description = "This is it... I'm really going to die.\n" + mood_change = -20 + +/datum/mood_event/gunpoint + description = "This guy is insane! I better be careful....\n" + mood_change = -10 + //These are unused so far but I want to remember them to use them later /datum/mood_event/surgery description = "HE'S CUTTING ME OPEN!!\n" @@ -223,4 +231,3 @@ /datum/mood_event/nanite_sadness/add_effects(message) description = "+++++++[message]+++++++\n" - diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index 28ea63e7bdf..0c339b4904e 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -44,3 +44,9 @@ to_chat(buckled_mob, "You feel a deep shock course through your body!") addtimer(CALLBACK(buckled_mob, /mob/living.proc/electrocute_act, 85, src, 1), 1) visible_message("The electric chair went off!", "You hear a deep sharp shock!") + +/obj/structure/chair/e_chair/post_buckle_mob(mob/living/L) + SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "dying", /datum/mood_event/deaths_door) + +/obj/structure/chair/e_chair/post_unbuckle_mob(mob/living/L) + SEND_SIGNAL(L, COMSIG_CLEAR_MOOD_EVENT, "dying") diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index 2ac5a2d4856..9f7ccff65ee 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -208,6 +208,7 @@ if (!istype(M, /mob/living/carbon/human)) return + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "dying", /datum/mood_event/deaths_door) var/mob/living/carbon/human/H = M if (H.dna) @@ -232,6 +233,7 @@ M.regenerate_icons() M.pixel_y -= -GUILLOTINE_HEAD_OFFSET // Move their body back M.layer -= GUILLOTINE_LAYER_DIFF + SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "dying") ..() /obj/structure/guillotine/can_be_unfasten_wrench(mob/user, silent)