mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-24 13:46:53 +01:00
Generalizing sleeping updates and adding it to simple mobs.
This commit is contained in:
@@ -1104,8 +1104,7 @@
|
||||
if (mind)
|
||||
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
|
||||
if(client || sleeping > 3)
|
||||
AdjustSleeping(-1)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
handle_sleeping()
|
||||
if( prob(2) && health && client )
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if(sleeping)
|
||||
adjustHalLoss(-3)
|
||||
if(mind && mind.active && client)
|
||||
AdjustSleeping(-1)
|
||||
handle_sleeping()
|
||||
SetBlinded(TRUE)
|
||||
set_stat(UNCONSCIOUS)
|
||||
else if(resting)
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
|
||||
//Check if we're on fire
|
||||
handle_fire()
|
||||
|
||||
|
||||
if(client && !(client.prefs.ambience_freq == 0)) // Handle re-running ambience to mobs if they've remained in an area, AND have an active client assigned to them, and do not have repeating ambience disabled.
|
||||
handle_ambience()
|
||||
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
@@ -122,6 +122,14 @@
|
||||
handle_slurring()
|
||||
handle_confused()
|
||||
|
||||
/mob/living/proc/handle_sleeping()
|
||||
if(sleeping)
|
||||
AdjustSleeping(-1)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
else
|
||||
clear_alert("asleep")
|
||||
return sleeping
|
||||
|
||||
/mob/living/proc/handle_stunned()
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
AdjustSleeping(-1)
|
||||
handle_sleeping()
|
||||
|
||||
if(src.resting)
|
||||
Weaken(5)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
if(stat >= DEAD)
|
||||
return FALSE
|
||||
|
||||
handle_sleeping()
|
||||
handle_stunned()
|
||||
handle_weakened()
|
||||
handle_paralysed()
|
||||
|
||||
Reference in New Issue
Block a user