CHECK_MOBILITY

This commit is contained in:
kevinz000
2020-03-03 20:41:08 -07:00
parent 8b0b685fa7
commit 1d198aca88
8 changed files with 9 additions and 9 deletions
@@ -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]"
+1 -1
View File
@@ -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, "<span class='notice'>You're too exhausted to keep going...</span>")
KnockToFloor(TRUE)
update_health_hud()
+1 -1
View File
@@ -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))
@@ -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)
@@ -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
@@ -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"))
@@ -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
@@ -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)