Removes some unnecessary wrapper procs (#44061)

* unwrap some things

* actually let's not #define this either
This commit is contained in:
vuonojenmustaturska
2019-05-22 15:41:11 +03:00
committed by 81Denton
parent a79ab97d39
commit cdad5e93a0
9 changed files with 19 additions and 26 deletions
@@ -4,7 +4,7 @@
set invisibility = 0
if (notransform)
return
if(..() && !IsInStasis()) //not dead and not in stasis
if(..() && !IS_IN_STASIS(src)) //not dead and not in stasis
// GROW!
if(amount_grown < max_grown)
amount_grown++
+4 -6
View File
@@ -28,9 +28,11 @@
if (QDELETED(src))
return 0
if(!IsInStasis())
if(!IS_IN_STASIS(src))
if(.) //not dead
handle_active_genes()
for(var/datum/mutation/human/HM in dna.mutations) // Handle active genes
HM.on_life()
if(stat != DEAD)
//heart attack stuff
@@ -310,10 +312,6 @@
clear_alert("embeddedobject")
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "embedded")
/mob/living/carbon/human/proc/handle_active_genes()
for(var/datum/mutation/human/HM in dna.mutations)
HM.on_life()
/mob/living/carbon/human/proc/handle_heart()
var/we_breath = !HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT)
+1 -1
View File
@@ -8,7 +8,7 @@
damageoverlaytemp = 0
update_damage_hud()
if(!IsInStasis())
if(!IS_IN_STASIS(src))
if(stat != DEAD) //Reagent processing needs to come before breathing, to prevent edge cases.
handle_organs()
@@ -9,7 +9,7 @@
if (notransform)
return
if(..() && !IsInStasis())
if(..() && !IS_IN_STASIS(src))
if(!client)
if(stat == CONSCIOUS)
+1 -1
View File
@@ -35,7 +35,7 @@
if(!loc)
return
if(!IsInStasis())
if(!IS_IN_STASIS(src))
if(stat != DEAD)
//Mutations and radiation
+2 -3
View File
@@ -383,7 +383,7 @@
death()
/mob/living/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, check_immobilized = FALSE, ignore_stasis = FALSE)
if(stat || IsUnconscious() || IsStun() || IsParalyzed() || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)) || (!ignore_stasis && IsInStasis()))
if(stat || IsUnconscious() || IsStun() || IsParalyzed() || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)) || (!ignore_stasis && IS_IN_STASIS(src)))
return TRUE
/mob/living/canUseStorage()
@@ -1097,8 +1097,7 @@
var/stun = IsStun()
var/knockdown = IsKnockdown()
var/ignore_legs = get_leg_ignore()
var/in_stasis = IsInStasis()
var/canmove = !IsImmobilized() && !stun && conscious && !paralyzed && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && !in_stasis && (has_arms || ignore_legs || has_legs)
var/canmove = !IsImmobilized() && !stun && conscious && !paralyzed && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && !IS_IN_STASIS(src) && (has_arms || ignore_legs || has_legs)
if(canmove)
mobility_flags |= MOBILITY_MOVE
else
-8
View File
@@ -374,14 +374,6 @@
priority_absorb_key["stuns_absorbed"] += amount
return TRUE
/////////////////////////////////// STASIS ///////////////////////////////////
/mob/living/proc/IsInStasis()
. = has_status_effect(STATUS_EFFECT_STASIS)
/mob/living/proc/SetStasis(apply, updating = TRUE)
. = apply ? apply_status_effect(STATUS_EFFECT_STASIS, null, updating) : remove_status_effect(STATUS_EFFECT_STASIS)
/////////////////////////////////// DISABILITIES ////////////////////////////////////
/mob/living/proc/add_quirk(quirktype, spawn_effects) //separate proc due to the way these ones are handled
if(HAS_TRAIT(src, quirktype))