diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 283bb595c60..29ef1a24846 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -157,8 +157,6 @@ src << "\red All systems restored." emp_damage -= 1 - //Other - handle_statuses() return 1 /mob/living/carbon/brain/handle_regular_hud_updates() @@ -254,4 +252,4 @@ emp_damage += rand(10,20) if(3) emp_damage += rand(0,10) - ..()*/ + ..()*/ diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8d2bf94ed38..3aef372c632 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -868,6 +868,7 @@ return //TODO: DEFERRED +//DO NOT CALL handle_statuses() from this proc, it's called from living/Life() as long as this returns a true value. /mob/living/carbon/human/handle_regular_status_updates() if(!handle_some_updates()) return 0 @@ -1010,9 +1011,6 @@ jitteriness = max(0, jitteriness - 3) adjustHalLoss(-1) - //Other - handle_statuses() - if (drowsyness) drowsyness-- eye_blurry = max(2, eye_blurry) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 5e7a6e2d90f..c3162b030cd 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -47,7 +47,7 @@ if(handle_regular_status_updates()) // Status & health update, are we dead or alive etc. handle_disabilities() // eye, ear, brain damages - handle_status_effects() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc + handle_statuses() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc handle_actions() @@ -94,19 +94,55 @@ stat = CONSCIOUS return 1 -//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc.. -/mob/living/proc/handle_status_effects() - if(paralysis) - paralysis = max(paralysis-1,0) +/mob/living/proc/handle_statuses() + handle_stunned() + handle_weakened() + handle_paralysed() + handle_stuttering() + handle_silent() + handle_drugged() + handle_slurring() + +/mob/living/proc/handle_stunned() if(stunned) - stunned = max(stunned-1,0) + AdjustStunned(-1) if(!stunned) update_icons() + return stunned +/mob/living/proc/handle_weakened() if(weakened) weakened = max(weakened-1,0) if(!weakened) update_icons() + return weakened + +/mob/living/proc/handle_stuttering() + if(stuttering) + stuttering = max(stuttering-1, 0) + return stuttering + +/mob/living/proc/handle_silent() + if(silent) + silent = max(silent-1, 0) + return silent + +/mob/living/proc/handle_drugged() + if(druggy) + druggy = max(druggy-1, 0) + return druggy + +/mob/living/proc/handle_slurring() + if(slurring) + slurring = max(slurring-1, 0) + return slurring + +/mob/living/proc/handle_paralysed() + if(paralysis) + AdjustParalysis(-1) + if(!paralysis) + update_icons() + return paralysis /mob/living/proc/handle_disabilities() //Eyes diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4503ae144ba..c185f880cc7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -914,49 +914,6 @@ mob/proc/yank_out_object() anchored = 0 return 1 -/mob/living/proc/handle_statuses() - handle_stunned() - handle_weakened() - handle_stuttering() - handle_silent() - handle_drugged() - handle_slurring() - -/mob/living/proc/handle_stunned() - if(stunned) - AdjustStunned(-1) - return stunned - -/mob/living/proc/handle_weakened() - if(weakened) - weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times - return weakened - -/mob/living/proc/handle_stuttering() - if(stuttering) - stuttering = max(stuttering-1, 0) - return stuttering - -/mob/living/proc/handle_silent() - if(silent) - silent = max(silent-1, 0) - return silent - -/mob/living/proc/handle_drugged() - if(druggy) - druggy = max(druggy-1, 0) - return druggy - -/mob/living/proc/handle_slurring() - if(slurring) - slurring = max(slurring-1, 0) - return slurring - -/mob/living/proc/handle_paralysed() // Currently only used by simple_animal.dm, treated as a special case in other mobs - if(paralysis) - AdjustParalysis(-1) - return paralysis - //Check for brain worms in head. /mob/proc/has_brain_worms()