From 4784054eeaf8a128c238f930f13a5f7a00a4b426 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:08:51 +0200 Subject: [PATCH] [MIRROR] [no gbp] fixes sleeping mobs getting the surgery (#28763) * [no gbp] fixes sleeping mobs getting the surgery (#84732) fixes #84617 i did test this, no clue how this got missed... * [no gbp] fixes sleeping mobs getting the surgery --------- Co-authored-by: Afevis --- code/modules/surgery/surgery_step.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index 5172900fcc3..4058348b179 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -194,7 +194,7 @@ return if(target.stat >= UNCONSCIOUS) var/datum/mood_event/surgery/target_mood_event = target.mob_mood.mood_events[SURGERY_MOOD_CATEGORY] - if(target_mood_event?.surgery_completed) //don't give sleeping mobs trauma. that said, if they fell asleep mid-surgery after already getting the bad mood, lets make sure they wake up to a (hopefully) happy memory. + if(!target_mood_event || target_mood_event.surgery_completed) //don't give sleeping mobs trauma. that said, if they fell asleep mid-surgery after already getting the bad mood, lets make sure they wake up to a (hopefully) happy memory. return switch(surgery_state) if(SURGERY_STATE_STARTED)