From 1d198aca889a0f3fb1d18b166a10ac629623df1e Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Tue, 3 Mar 2020 20:41:08 -0700 Subject: [PATCH] CHECK_MOBILITY --- code/modules/mob/living/carbon/alien/humanoid/update_icons.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/mob/living/carbon/examine.dm | 2 +- code/modules/mob/living/carbon/human/human_defense.dm | 2 +- code/modules/mob/living/carbon/monkey/combat.dm | 2 +- code/modules/mob/living/carbon/monkey/life.dm | 4 ++-- code/modules/mob/living/simple_animal/friendly/cat.dm | 2 +- code/modules/mob/living/simple_animal/parrot.dm | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm index ba87277669..ca62df0b57 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/update_icons.dm @@ -17,7 +17,7 @@ else if(leap_on_click) icon_state = "alien[caste]_pounce" - else if(lying || !CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) || asleep) + else if(lying || !CHECK_MOBILITY(src, MOBILITY_STAND) || asleep) icon_state = "alien[caste]_sleep" else if(mob_size == MOB_SIZE_LARGE) icon_state = "alien[caste]" diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index e5e757a165..5f9e838330 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -580,7 +580,7 @@ if(stam > DAMAGE_PRECISION) var/total_health = (health - stam) if(total_health <= crit_threshold && !stat) - if(CHECK_BITFIELD(mobility_flags, MOBILITY_STAND)) + if(CHECK_MOBILITY(src, MOBILITY_STAND)) to_chat(src, "You're too exhausted to keep going...") KnockToFloor(TRUE) update_health_hud() diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 8863ab1aba..efd81c1744 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -91,7 +91,7 @@ . += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner." if(combatmode) - . += "[t_He] [t_is] visibly tense[CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) ? "." : ", and [t_is] standing in combative stance."]" + . += "[t_He] [t_is] visibly tense[CHECK_MOBILITY(src, MOBILITY_STAND) ? "." : ", and [t_is] standing in combative stance."]" var/trait_exam = common_trait_examine() if (!isnull(trait_exam)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index db91fa1169..5db1263147 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -294,7 +294,7 @@ if(M.force > 35) // durand and other heavy mechas DefaultCombatKnockdown(50) src.throw_at(throw_target, rand(1,5), 7) - else if(M.force >= 20 && CHECK_BITFIELD(mobility_flags, MOBILITY_STAND)) // lightweight mechas like gygax + else if(M.force >= 20 && CHECK_MOBILITY(src, MOBILITY_STAND)) // lightweight mechas like gygax DefaultCombatKnockdown(30) src.throw_at(throw_target, rand(1,3), 7) update |= temp.receive_damage(dmg, 0) diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 56088672b2..a06d65ad4b 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -50,7 +50,7 @@ // taken from /mob/living/carbon/human/interactive/ /mob/living/carbon/monkey/proc/IsDeadOrIncap(checkDead = TRUE) - if(!CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE)) + if(!CHECK_MOBILITY(src, MOBILITY_MOVE)) return TRUE if(health <= 0 && checkDead) return TRUE diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 1961c66dc1..31589f1cab 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -13,7 +13,7 @@ if(!client) if(stat == CONSCIOUS) - if(on_fire || buckled || restrained() || (!CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) && CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE))) //CIT CHANGE - makes it so monkeys attempt to resist if they're resting) + if(on_fire || buckled || restrained() || (!CHECK_MOBILITY(src, MOBILITY_STAND) && CHECK_MOBILITY(src, MOBILITY_MOVE))) //CIT CHANGE - makes it so monkeys attempt to resist if they're resting) if(!resisting && prob(MONKEY_RESIST_PROB)) resisting = TRUE walk_to(src,0) @@ -21,7 +21,7 @@ else if(resisting) resisting = FALSE else if((mode == MONKEY_IDLE && !pickupTarget && !prob(MONKEY_SHENANIGAN_PROB)) || !handle_combat()) - if(prob(25) && CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) && isturf(loc) && !pulledby) + if(prob(25) && CHECK_MOBILITY(src, MOBILITY_MOVE) && isturf(loc) && !pulledby) step(src, pick(GLOB.cardinals)) else if(prob(1)) emote(pick("scratch","jump","roll","tail")) diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 96ec5b606c..1297fddb69 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -46,7 +46,7 @@ /mob/living/simple_animal/pet/cat/update_mobility() . = ..() if(client && stat != DEAD) - if(!CHECK_BITFIELD(mobility_flags, MOBILITY_STAND)) + if(!CHECK_MOBILITY(src, MOBILITY_STAND)) icon_state = "[icon_living]_rest" collar_type = "[initial(collar_type)]_rest" else diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 4a62fc143e..9ad9a121ca 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -381,7 +381,7 @@ /mob/living/simple_animal/parrot/handle_automated_movement() - if(!isturf(loc) || !CHECK_BITFIELD(mobility_flags, MOBILITY_MOVE) || buckled) + if(!isturf(loc) || !CHECK_MOBILITY(src, MOBILITY_MOVE) || buckled) return //If it can't move, dont let it move. (The buckled check probably isn't necessary thanks to canmove) if(client && stat == CONSCIOUS && parrot_state != icon_living)