Merge pull request #3387 from VOREStation/aro-pol-zzz

Stasis Bag and Sleeper Changes
This commit is contained in:
Neerti
2017-05-02 12:09:33 -04:00
committed by GitHub
9 changed files with 200 additions and 34 deletions

View File

@@ -185,6 +185,26 @@
wearing_rig.notify_ai("<span class='danger'>Warning: user consciousness failure. Mobility control passed to integrated intelligence system.</span>")
..()
/mob/living/carbon/human/proc/Stasis(amount)
if((species.flags & NO_SCAN) || isSynthetic())
in_stasis = 0
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

View File

@@ -62,8 +62,12 @@
voice = GetVoice()
var/stasis = inStasisNow()
if(getStasis() > 2)
Sleeping(20)
//No need to update all of these procs if the guy is dead.
if(stat != DEAD && !in_stasis)
if(stat != DEAD && !stasis)
//Updates the number of stored chemicals for powers
handle_changeling()
@@ -82,7 +86,6 @@
if(!client)
species.handle_npc(src)
if(!handle_some_updates())
return //We go ahead and process them 5 times for HUD images and other stuff though.
@@ -97,7 +100,7 @@
return 1
/mob/living/carbon/human/breathe()
if(!in_stasis)
if(!inStasisNow())
..()
// Calculate how vulnerable the human is to under- and overpressure.
@@ -207,7 +210,7 @@
/mob/living/carbon/human/handle_mutations_and_radiation()
if(in_stasis)
if(inStasisNow())
return
if(getFireLoss())
@@ -789,7 +792,7 @@
/mob/living/carbon/human/handle_chemicals_in_body()
if(in_stasis)
if(inStasisNow())
return
if(reagents)
@@ -1339,7 +1342,7 @@
if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING
/mob/living/carbon/human/handle_random_events()
if(in_stasis)
if(inStasisNow())
return
// Puke if toxloss is too high

View File

@@ -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))