diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 33af21120de..542db99dc1e 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -293,15 +293,6 @@ CheckStamina() - if(sleeping) - handle_dreams() - adjustStaminaLoss(-10) - sleeping = max(sleeping - 1, 0) - if(prob(10) && health && !hal_crit) - spawn(0) - emote("snore") - - var/restingpwr = 1 + 4 * resting //Dizziness @@ -373,6 +364,15 @@ else hallucination -= 2 +/mob/living/carbon/handle_sleeping() + if(..()) + handle_dreams() + adjustStaminaLoss(-10) + if(prob(10) && health && !hal_crit) + spawn(0) + emote("snore") + + //this handles hud updates. Calls update_vision() and handle_hud_icons() /mob/living/carbon/handle_regular_hud_updates() if(!client) return 0 diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 062a8e3b69e..ee8ef7efee2 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -110,6 +110,7 @@ handle_drugged() handle_slurring() handle_paralysed() + handle_sleeping() /mob/living/proc/handle_stunned() @@ -151,6 +152,11 @@ AdjustParalysis(-1) return paralysis +/mob/living/proc/handle_sleeping() + if(sleeping) + sleeping = max(sleeping - 1, 0) + return sleeping + /mob/living/proc/handle_disabilities() diff --git a/html/changelogs/Crazylemon64-PR-3119.yml b/html/changelogs/Crazylemon64-PR-3119.yml new file mode 100644 index 00000000000..55040c7f45a --- /dev/null +++ b/html/changelogs/Crazylemon64-PR-3119.yml @@ -0,0 +1,35 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. Remove the quotation mark and put in your name when copy+pasting the example changelog. +author: Crazylemon64 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Sleeping simple animals should tick down sleeping as normal - deaf simple mobs are no longer a thing"