Merge pull request #3119 from Crazylemon64/simple_animals_sleeping

Simple animals will now tick down sleeping
This commit is contained in:
Fox McCloud
2016-01-05 02:37:37 -05:00
3 changed files with 50 additions and 9 deletions
+9 -9
View File
@@ -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
+6
View File
@@ -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()