mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +00:00
Merge pull request #1430 from mwerezak/living-life-fix-polaris
Human Life Fixes
This commit is contained in:
@@ -43,8 +43,6 @@
|
|||||||
silent = 0
|
silent = 0
|
||||||
else
|
else
|
||||||
updatehealth()
|
updatehealth()
|
||||||
handle_stunned()
|
|
||||||
handle_weakened()
|
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
death()
|
death()
|
||||||
blinded = 1
|
blinded = 1
|
||||||
@@ -52,7 +50,6 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
if(paralysis && paralysis > 0)
|
if(paralysis && paralysis > 0)
|
||||||
handle_paralysed()
|
|
||||||
blinded = 1
|
blinded = 1
|
||||||
stat = UNCONSCIOUS
|
stat = UNCONSCIOUS
|
||||||
if(halloss > 0)
|
if(halloss > 0)
|
||||||
|
|||||||
@@ -157,8 +157,6 @@
|
|||||||
src << "\red All systems restored."
|
src << "\red All systems restored."
|
||||||
emp_damage -= 1
|
emp_damage -= 1
|
||||||
|
|
||||||
//Other
|
|
||||||
handle_statuses()
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/mob/living/carbon/brain/handle_regular_hud_updates()
|
/mob/living/carbon/brain/handle_regular_hud_updates()
|
||||||
@@ -254,4 +252,4 @@
|
|||||||
emp_damage += rand(10,20)
|
emp_damage += rand(10,20)
|
||||||
if(3)
|
if(3)
|
||||||
emp_damage += rand(0,10)
|
emp_damage += rand(0,10)
|
||||||
..()*/
|
..()*/
|
||||||
|
|||||||
@@ -868,6 +868,7 @@
|
|||||||
|
|
||||||
return //TODO: DEFERRED
|
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()
|
/mob/living/carbon/human/handle_regular_status_updates()
|
||||||
if(!handle_some_updates())
|
if(!handle_some_updates())
|
||||||
return 0
|
return 0
|
||||||
@@ -921,19 +922,16 @@
|
|||||||
animate_tail_reset()
|
animate_tail_reset()
|
||||||
adjustHalLoss(-3)
|
adjustHalLoss(-3)
|
||||||
|
|
||||||
if(paralysis)
|
if(sleeping)
|
||||||
AdjustParalysis(-1)
|
speech_problem_flag = 1
|
||||||
|
handle_dreams()
|
||||||
else if(sleeping)
|
if (mind)
|
||||||
speech_problem_flag = 1
|
//Are they SSD? If so we'll keep them asleep but work off some of that sleep var in case of stoxin or similar.
|
||||||
handle_dreams()
|
if(client || sleeping > 3)
|
||||||
if (mind)
|
AdjustSleeping(-1)
|
||||||
//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( prob(2) && health && !hal_crit )
|
||||||
if(client || sleeping > 3)
|
spawn(0)
|
||||||
AdjustSleeping(-1)
|
emote("snore")
|
||||||
if( prob(2) && health && !hal_crit )
|
|
||||||
spawn(0)
|
|
||||||
emote("snore")
|
|
||||||
//CONSCIOUS
|
//CONSCIOUS
|
||||||
else
|
else
|
||||||
stat = CONSCIOUS
|
stat = CONSCIOUS
|
||||||
@@ -1010,9 +1008,6 @@
|
|||||||
jitteriness = max(0, jitteriness - 3)
|
jitteriness = max(0, jitteriness - 3)
|
||||||
adjustHalLoss(-1)
|
adjustHalLoss(-1)
|
||||||
|
|
||||||
//Other
|
|
||||||
handle_statuses()
|
|
||||||
|
|
||||||
if (drowsyness)
|
if (drowsyness)
|
||||||
drowsyness--
|
drowsyness--
|
||||||
eye_blurry = max(2, eye_blurry)
|
eye_blurry = max(2, eye_blurry)
|
||||||
|
|||||||
@@ -106,14 +106,11 @@
|
|||||||
else
|
else
|
||||||
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
|
||||||
if (src.stunned > 0)
|
if (src.stunned > 0)
|
||||||
AdjustStunned(-1)
|
|
||||||
src.stat = 0
|
src.stat = 0
|
||||||
if (src.weakened > 0)
|
if (src.weakened > 0)
|
||||||
AdjustWeakened(-1)
|
|
||||||
src.lying = 0
|
src.lying = 0
|
||||||
src.stat = 0
|
src.stat = 0
|
||||||
if (src.paralysis > 0)
|
if (src.paralysis > 0)
|
||||||
AdjustParalysis(-1)
|
|
||||||
src.blinded = 0
|
src.blinded = 0
|
||||||
src.lying = 0
|
src.lying = 0
|
||||||
src.stat = 0
|
src.stat = 0
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
if(handle_regular_status_updates()) // Status & health update, are we dead or alive etc.
|
if(handle_regular_status_updates()) // Status & health update, are we dead or alive etc.
|
||||||
handle_disabilities() // eye, ear, brain damages
|
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()
|
handle_actions()
|
||||||
|
|
||||||
@@ -94,19 +94,55 @@
|
|||||||
stat = CONSCIOUS
|
stat = CONSCIOUS
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
|
/mob/living/proc/handle_statuses()
|
||||||
/mob/living/proc/handle_status_effects()
|
handle_stunned()
|
||||||
if(paralysis)
|
handle_weakened()
|
||||||
paralysis = max(paralysis-1,0)
|
handle_paralysed()
|
||||||
|
handle_stuttering()
|
||||||
|
handle_silent()
|
||||||
|
handle_drugged()
|
||||||
|
handle_slurring()
|
||||||
|
|
||||||
|
/mob/living/proc/handle_stunned()
|
||||||
if(stunned)
|
if(stunned)
|
||||||
stunned = max(stunned-1,0)
|
AdjustStunned(-1)
|
||||||
if(!stunned)
|
if(!stunned)
|
||||||
update_icons()
|
update_icons()
|
||||||
|
return stunned
|
||||||
|
|
||||||
|
/mob/living/proc/handle_weakened()
|
||||||
if(weakened)
|
if(weakened)
|
||||||
weakened = max(weakened-1,0)
|
weakened = max(weakened-1,0)
|
||||||
if(!weakened)
|
if(!weakened)
|
||||||
update_icons()
|
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()
|
/mob/living/proc/handle_disabilities()
|
||||||
//Eyes
|
//Eyes
|
||||||
|
|||||||
@@ -914,49 +914,6 @@ mob/proc/yank_out_object()
|
|||||||
anchored = 0
|
anchored = 0
|
||||||
return 1
|
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.
|
//Check for brain worms in head.
|
||||||
/mob/proc/has_brain_worms()
|
/mob/proc/has_brain_worms()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user