From 3cf450d5643fcdf2812781e64cdc2b57c70b3ff5 Mon Sep 17 00:00:00 2001 From: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com> Date: Tue, 11 Aug 2020 07:55:46 -0700 Subject: [PATCH] Give mood buff for defibbing someone (#52798) --- code/datums/mood_events/generic_positive_events.dm | 2 +- code/game/objects/items/defib.dm | 1 + code/modules/mob/living/carbon/human/human.dm | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/datums/mood_events/generic_positive_events.dm b/code/datums/mood_events/generic_positive_events.dm index c91b3ad45b2..00f4e4a064b 100644 --- a/code/datums/mood_events/generic_positive_events.dm +++ b/code/datums/mood_events/generic_positive_events.dm @@ -59,7 +59,7 @@ special_screen_obj = "honked_nose" special_screen_replace = FALSE -/datum/mood_event/perform_cpr +/datum/mood_event/saved_life description = "It feels good to save a life.\n" mood_change = 6 timeout = 8 MINUTES diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 34b99a062f8..3d66968c617 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -608,6 +608,7 @@ H.emote("gasp") H.Jitter(100) SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "saved_life", /datum/mood_event/saved_life) log_combat(user, H, "revived", defib) if(req_defib) defib.deductcharge(revivecost) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a9559db26c5..5bd902875a2 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -693,7 +693,7 @@ return FALSE visible_message("[src] performs CPR on [target.name]!", "You perform CPR on [target.name].") - SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "perform_cpr", /datum/mood_event/perform_cpr) + SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "saved_life", /datum/mood_event/saved_life) log_combat(src, target, "CPRed") if (HAS_TRAIT(target, TRAIT_NOBREATH))