From 184f3081fe28451944a01a86377ef22fe50f2998 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 2 Nov 2021 23:12:14 +0000 Subject: [PATCH] [MIRROR] Tweaks obsession to allow better interaction [MDB IGNORE] (#9210) * Tweaks obsession to allow better interaction (#62499) * Tweaks obsession to allow better interaction * More clear hint of why you're acting weird * Tweaks obsession to allow better interaction Co-authored-by: Rohesie --- code/datums/brain_damage/creepy_trauma.dm | 43 +++++++++++------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/code/datums/brain_damage/creepy_trauma.dm b/code/datums/brain_damage/creepy_trauma.dm index ab17e25e170..61093fb9dbd 100644 --- a/code/datums/brain_damage/creepy_trauma.dm +++ b/code/datums/brain_damage/creepy_trauma.dm @@ -73,37 +73,36 @@ /datum/brain_trauma/special/obsessed/handle_speech(datum/source, list/speech_args) if(!viewing) return - var/datum/component/mood/mood = owner.GetComponent(/datum/component/mood) - if(mood && mood.sanity >= SANITY_GREAT && social_interaction()) - speech_args[SPEECH_MESSAGE] = "" + if(prob(25)) // 25% chances to be nervous and stutter. + if(prob(50)) // 12.5% chance (previous check taken into account) of doing something suspicious. + addtimer(CALLBACK(src, .proc/on_failed_social_interaction), rand(1, 3) SECONDS) + else if(owner.stuttering == 0) + to_chat(owner, span_warning("Being near [obsession] makes you nervous and you begin to stutter...")) + owner.stuttering = max(3, owner.stuttering) /datum/brain_trauma/special/obsessed/proc/on_hug(mob/living/hugger, mob/living/hugged) SIGNAL_HANDLER if(hugged == obsession) obsession_hug_count++ -/datum/brain_trauma/special/obsessed/proc/social_interaction() - var/fail = FALSE //whether you can finish a sentence while doing it - owner.stuttering = max(3, owner.stuttering) - owner.blur_eyes(10) - switch(rand(1,4)) - if(1) +/datum/brain_trauma/special/obsessed/proc/on_failed_social_interaction() + if(QDELETED(owner) || owner.stat >= UNCONSCIOUS) + return + switch(rand(1, 100)) + if(1 to 40) + INVOKE_ASYNC(owner, /mob.proc/emote, pick("blink", "blink_r")) + owner.blur_eyes(10) + to_chat(owner, span_userdanger("You sweat profusely and have a hard time focusing...")) + if(41 to 80) + INVOKE_ASYNC(owner, /mob.proc/emote, "pale") shake_camera(owner, 15, 1) - owner.vomit() - fail = TRUE - if(2) + owner.adjustStaminaLoss(70) + to_chat(owner, span_userdanger("You feel your heart lurching in your chest...")) + if(81 to 100) INVOKE_ASYNC(owner, /mob.proc/emote, "cough") owner.dizziness += 10 - fail = TRUE - if(3) - to_chat(owner, span_userdanger("You feel your heart lurching in your chest...")) - owner.Stun(20) - shake_camera(owner, 15, 1) - if(4) - to_chat(owner, span_warning("You faint.")) - owner.Unconscious(80) - fail = TRUE - return fail + owner.adjust_disgust(5) + to_chat(owner, span_userdanger("You gag and swallow a bit of bile...")) // if the creep examines first, then the obsession examines them, have a 50% chance to possibly blow their cover. wearing a mask avoids this risk /datum/brain_trauma/special/obsessed/proc/stare(datum/source, mob/living/examining_mob, triggering_examiner)