From df224e81d6b540bd8461dd2006e2ace0324e3392 Mon Sep 17 00:00:00 2001 From: Crazylemon Date: Mon, 4 Jan 2016 13:47:36 -0800 Subject: [PATCH 1/3] Simple animals will now tick down sleeping --- code/modules/mob/living/carbon/life.dm | 17 ++++++++--------- code/modules/mob/living/life.dm | 7 +++++++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 33af21120de..ca87e8b1e22 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,14 @@ else hallucination -= 2 +/mob/living/carbon/handle_sleeping() + if(..()) + 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..91248c2ab14 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,12 @@ AdjustParalysis(-1) return paralysis +/mob/living/proc/handle_sleeping() + if(sleeping) + handle_dreams() + sleeping = max(sleeping - 1, 0) + return sleeping + /mob/living/proc/handle_disabilities() From 3a3f0f56c4d9aa693fca9ef2b9dc45ca95ac6a79 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 4 Jan 2016 21:48:03 -0800 Subject: [PATCH 2/3] Simple_animals now tick down sleeping, so relogging doesn't cause deaf --- code/modules/mob/living/carbon/life.dm | 1 + code/modules/mob/living/life.dm | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index ca87e8b1e22..542db99dc1e 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -366,6 +366,7 @@ /mob/living/carbon/handle_sleeping() if(..()) + handle_dreams() adjustStaminaLoss(-10) if(prob(10) && health && !hal_crit) spawn(0) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 91248c2ab14..ee8ef7efee2 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -154,7 +154,6 @@ /mob/living/proc/handle_sleeping() if(sleeping) - handle_dreams() sleeping = max(sleeping - 1, 0) return sleeping From c1c9dbf36c9f61c70348b001e2135c949578e294 Mon Sep 17 00:00:00 2001 From: Crazylemon64 Date: Mon, 4 Jan 2016 22:32:44 -0800 Subject: [PATCH 3/3] Changelog!~ --- html/changelogs/Crazylemon64-PR-3119.yml | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 html/changelogs/Crazylemon64-PR-3119.yml 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"