mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Allows 'escaping' sleepers, among other things
Added some helper procs for stasis things, and also allows using grabs on sleepers like the advanced scanner because that inconsistency between the machines was bothering me.
This commit is contained in:
@@ -159,6 +159,20 @@
|
||||
else
|
||||
in_stasis = amount
|
||||
|
||||
/mob/living/carbon/human/proc/getStasis()
|
||||
if((species.flags & NO_SCAN) || isSynthetic())
|
||||
return 0
|
||||
|
||||
return in_stasis
|
||||
|
||||
//This determines if, RIGHT NOW, the life() tick is being skipped due to stasis
|
||||
/mob/living/carbon/human/proc/inStasisNow()
|
||||
var/stasisValue = getStasis()
|
||||
if(stasisValue && (life_tick % stasisValue))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/getCloneLoss()
|
||||
if((species.flags & NO_SCAN) || isSynthetic())
|
||||
cloneloss = 0
|
||||
|
||||
@@ -62,11 +62,12 @@
|
||||
|
||||
voice = GetVoice()
|
||||
|
||||
//No need to update all of these procs if the guy is dead.
|
||||
if(stat != DEAD && (!in_stasis || life_tick % in_stasis == 1))
|
||||
if(in_stasis > 2)
|
||||
Sleeping(10)
|
||||
var/stasis = inStasisNow()
|
||||
if(getStasis() > 2)
|
||||
Sleeping(20)
|
||||
|
||||
//No need to update all of these procs if the guy is dead.
|
||||
if(stat != DEAD && !stasis)
|
||||
//Updates the number of stored chemicals for powers
|
||||
handle_changeling()
|
||||
|
||||
@@ -99,7 +100,7 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/breathe()
|
||||
if(!in_stasis || life_tick % in_stasis == 1)
|
||||
if(!inStasisNow())
|
||||
..()
|
||||
|
||||
// Calculate how vulnerable the human is to under- and overpressure.
|
||||
@@ -209,7 +210,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation()
|
||||
if(in_stasis && life_tick % in_stasis != 1)
|
||||
if(inStasisNow())
|
||||
return
|
||||
|
||||
if(getFireLoss())
|
||||
@@ -791,7 +792,7 @@
|
||||
|
||||
/mob/living/carbon/human/handle_chemicals_in_body()
|
||||
|
||||
if(in_stasis && life_tick % in_stasis != 1)
|
||||
if(inStasisNow())
|
||||
return
|
||||
|
||||
if(reagents)
|
||||
@@ -1341,7 +1342,7 @@
|
||||
if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
/mob/living/carbon/human/handle_random_events()
|
||||
if(in_stasis && life_tick % in_stasis != 1)
|
||||
if(inStasisNow())
|
||||
return
|
||||
|
||||
// Puke if toxloss is too high
|
||||
|
||||
@@ -37,7 +37,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5
|
||||
|
||||
// Takes care blood loss and regeneration
|
||||
/mob/living/carbon/human/handle_blood()
|
||||
if(in_stasis)
|
||||
if(inStasisNow())
|
||||
return
|
||||
|
||||
if(!should_have_organ(O_HEART))
|
||||
|
||||
Reference in New Issue
Block a user