From 27a011e44fd026cd7e8921f717ac0a73b456e087 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Fri, 13 Nov 2015 20:45:57 -0800 Subject: [PATCH] fix stunned shit --- code/modules/mob/living/carbon/brain/life.dm | 2 - code/modules/mob/living/carbon/human/life.dm | 6 +-- code/modules/mob/living/life.dm | 45 ++++++++++++++++++-- code/modules/mob/living/silicon/pai/life.dm | 6 +-- code/modules/mob/mob.dm | 43 ------------------- 5 files changed, 44 insertions(+), 58 deletions(-) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 71ca32e5f97..203039250d7 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -76,8 +76,6 @@ silent = 0 return 1 - handle_statuses() - . = 1 /mob/living/carbon/brain/handle_vision() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d148ac69d61..351b880de28 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -760,7 +760,8 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc /mob/living/carbon/human/handle_regular_status_updates() - if(status_flags & GODMODE) return 0 + if(status_flags & GODMODE) + return 0 //SSD check, if a logged player is awake put them back to sleep! if(player_logged && sleeping < 2) @@ -959,9 +960,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc if(flying) animate(src, pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING) - //Other - handle_statuses() - // If you're dirty, your gloves will become dirty, too. if(gloves && germ_level > gloves.germ_level && prob(10)) gloves.germ_level += 1 diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 044e7fd73ca..60cd33d689d 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -102,17 +102,54 @@ //this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc.. /mob/living/proc/handle_status_effects() - if(paralysis) - paralysis = max(paralysis-1,0) + handle_stunned() + handle_weakened() + handle_stuttering() + handle_silent() + handle_drugged() + handle_slurring() + handle_paralysed() + + +/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) + weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times 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() // Currently only used by simple_animal.dm, treated as a special case in other mobs + if(paralysis) + AdjustParalysis(-1) + return paralysis + /mob/living/proc/handle_disabilities() diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm index f7fac8e3a0a..38c7df68aa3 100644 --- a/code/modules/mob/living/silicon/pai/life.dm +++ b/code/modules/mob/living/silicon/pai/life.dm @@ -17,9 +17,6 @@ M.show_message("\red The data cable rapidly retracts back into its spool.", 3, "\red You hear a click and the sound of wire spooling rapidly.", 2) qdel(src.cable) - handle_statuses() - - /mob/living/silicon/pai/updatehealth() if(status_flags & GODMODE) health = 100 @@ -27,5 +24,4 @@ else health = 100 - getBruteLoss() - getFireLoss() if(health <= 0) - death(0) - + death(0) \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a51f24cc8cc..46a7c80667b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1324,49 +1324,6 @@ mob/proc/yank_out_object() host.ckey = src.ckey host << "You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent." -/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 - /mob/proc/assess_threat() //For sec bot threat assessment return