From 2b3edf57fc0495aff992d6db297d96ca0eb18290 Mon Sep 17 00:00:00 2001 From: Vi3trice <80771500+Vi3trice@users.noreply.github.com> Date: Mon, 3 Jan 2022 12:34:26 -0500 Subject: [PATCH] Fix - Simple mobs sleep properly (#17273) --- code/modules/mob/living/simple_animal/simple_animal.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 5e54b575513..b468d30d7a4 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -151,6 +151,9 @@ . = ..() if(stat == DEAD) . += "Upon closer examination, [p_they()] appear[p_s()] to be dead." + return + if(sleeping) + . += "Upon closer examination, [p_they()] appear[p_s()] to be asleep." /mob/living/simple_animal/updatehealth(reason = "none given") ..(reason) @@ -181,8 +184,11 @@ death() create_debug_log("died of damage, trigger reason: [reason]") else - WakeUp() - create_debug_log("woke up, trigger reason: [reason]") + if(sleeping && (stat == CONSCIOUS)) + KnockOut() + if(!sleeping) + WakeUp() + create_debug_log("woke up, trigger reason: [reason]") med_hud_set_status() /mob/living/simple_animal/proc/handle_automated_action()