mobility flags

This commit is contained in:
kevinz000
2020-01-12 11:00:12 -08:00
parent 0fc6d0e891
commit b341818f04
20 changed files with 41 additions and 41 deletions
@@ -58,7 +58,7 @@
// Did I get knocked down?
if(owner && owner.incapacitated(ignore_restraints=TRUE, ignore_grab=TRUE))// owner.incapacitated())
// We're gonna cancel. But am I on the ground? Spin me!
if(!CHECK_MOBILTIY(user, MOBILITY_STAND))
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
var/send_dir = get_dir(owner, T)
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
owner.spin(10)
@@ -71,7 +71,7 @@
if (rand(0, 5) < level_current)
playsound(get_turf(newtarget), "sound/weapons/punch[rand(1,4)].ogg", 15, 1, -1)
newtarget.DefaultCombatKnockdown(10 + level_current * 5)
if(_REFACTORING_newtarget.IsStun())
if(newtarget._REFACTORING_IsStun())
newtarget.spin(10,1)
if (rand(0,4))
newtarget.drop_all_held_items()
@@ -74,7 +74,7 @@
target.adjustStaminaLoss(40 + 10 * level_current)
// Cancel Walk (we were close enough to contact them)
walk(owner, 0)
target._REFACTORING_Stun(10,1) //Without this the victim can just walk away
target.Stun(10,1) //Without this the victim can just walk away
target.grabbedby(owner) // Taken from mutations.dm under changelings
target.grippedby(owner, instant = TRUE) //instant aggro grab
+3 -3
View File
@@ -113,14 +113,14 @@
return ..()
/obj/structure/bookcase/attack_hand(mob/user)
/obj/structure/bookcase/attack_hand(mob/living/user)
. = ..()
if(.)
if(. || !istype(user))
return
if(contents.len)
var/obj/item/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
if(choice)
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
if(!CHECK_MOBILITY(user, MOBILITY_USE) || !in_range(loc, user))
return
if(ishuman(user))
if(!user.get_active_held_item())
@@ -10,7 +10,6 @@
density = FALSE
stat = DEAD
canmove = FALSE
anchored = TRUE // don't get pushed around
+1 -2
View File
@@ -1195,8 +1195,7 @@
if(scale_stamina_loss_recovery)
adjustStaminaLoss(min(-((getStaminaLoss() - stamina_loss_recovery_bypass) * scale_stamina_loss_recovery), 0))
if(put_on_feet)
resting = FALSE
lying = FALSE
set_resting(FALSE, TRUE, FALSE)
if(reset_misc)
stuttering = 0
updatehealth()
+2 -2
View File
@@ -2,9 +2,9 @@
//Force-set resting variable, without needing to resist/etc.
/mob/living/proc/set_resting(new_resting, silent = FALSE, updating = TRUE)
resting = new_resting
_REFACTORING_resting = new_resting
if(!silent)
to_chat(src, "<span class='notice'>You are now [resting? "resting" : "getting up"].</span>")
to_chat(src, "<span class='notice'>You are now [_REFACTORING_resting? "resting" : "getting up"].</span>")
update_resting(updating)
/mob/living/proc/update_resting(update_mobility = TRUE)
@@ -239,7 +239,7 @@ GLOBAL_VAR_INIT(hhmysteryRoomNumber, 1337)
to_chat(user, "<span class='warning'>The door seems to be malfunctioning and refuses to operate!</span>")
return
if(alert(user, "Hilbert's Hotel would like to remind you that while we will do everything we can to protect the belongings you leave behind, we make no guarantees of their safety while you're gone, especially that of the health of any living creatures. With that in mind, are you ready to leave?", "Exit", "Leave", "Stay") == "Leave")
if(!user.canmove || (get_dist(get_turf(src), get_turf(user)) > 1)) //no teleporting around if they're dead or moved away during the prompt.
if(!CHECK_MOBILITY(user, MOBILITY_MOVE) || (get_dist(get_turf(src), get_turf(user)) > 1)) //no teleporting around if they're dead or moved away during the prompt.
return
user.forceMove(get_turf(parentSphere))
do_sparks(3, FALSE, get_turf(user))
+1 -1
View File
@@ -252,7 +252,7 @@
disabled = new_disabled
owner.update_health_hud() //update the healthdoll
owner.update_body()
owner.update_canmove()
owner.update_mobility()
return TRUE
//Updates an organ's brute/burn states for use by update_damage_overlays()