This commit is contained in:
kevinz000
2020-01-10 13:43:53 -08:00
parent c0274b1bc6
commit 2c245a18fd
11 changed files with 23 additions and 26 deletions

View File

@@ -205,6 +205,7 @@
#define COMSIG_LIVING_STATUS_IMMOBILIZE "living_immobilize" //from base of mob/living/Immobilize() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_UNCONSCIOUS "living_unconscious" //from base of mob/living/Unconscious() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_SLEEP "living_sleeping" //from base of mob/living/Sleeping() (amount, update, ignore)
#define COMSIG_LIVING_STATUS_DAZE "living_daze" //from base of mob/living/Daze() (amount, update, ignore)
#define COMPONENT_NO_STUN 1 //For all of them
// /mob/living/carbon signals

View File

@@ -431,6 +431,6 @@
/obj/machinery/jukebox/disco/process()
. = ..()
if(active)
for(var/mob/M in rangers)
if(prob(5+(allowed(M)*4)) && M.canmove)
for(var/mob/living/M in rangers)
if(prob(5+(allowed(M)*4)) && CHECK_BITFIELD(M.mobility_flags, MOBILITY_MOVE))
dance(M)

View File

@@ -603,12 +603,12 @@
step_towards(user, T2)
T1 = get_turf(user)
if(T1 == T2)
user.resting = TRUE //so people can jump into crates without slamming the lid on their head
user.set_resting(TRUE, TRUE)
if(!close(user))
to_chat(user, "<span class='warning'>You can't get [src] to close!</span>")
user.resting = FALSE
user.set_resting(FALSE, TRUE)
return
user.resting = FALSE
user.set_resting(FALSE, TRUE)
togglelock(user)
T1.visible_message("<span class='warning'>[user] dives into [src]!</span>")

View File

@@ -19,7 +19,7 @@
var/use_mob_movespeed = FALSE //Citadel adds snowflake box handling
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc))
if(opened || move_delay || !CHECK_BITFIELD(user.mobility_flags, MOBILITY_MOVE) || !isturf(loc) || !has_gravity(loc))
return
move_delay = TRUE
if(step(src, direction))

View File

@@ -109,8 +109,7 @@
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(src.loc)
pushed_mob.resting = TRUE
pushed_mob.update_canmove()
pushed_mob.set_resting(TRUE, FALSE)
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
log_combat(user, pushed_mob, "placed")
@@ -138,11 +137,11 @@
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
if(!target.resting)
if(CHECK_BITFIELD(target.mobility_flags, MOBILITY_STAND))
target.DefaultCombatKnockdown(SHOVE_KNOCKDOWN_TABLE)
user.visible_message("<span class='danger'>[user.name] shoves [target.name] onto \the [src]!</span>",
"<span class='danger'>You shove [target.name] onto \the [src]!</span>", null, COMBAT_MESSAGE_RANGE)
target.forceMove(src.loc)
target.forceMove(loc)
log_combat(user, target, "shoved", "onto [src] (table)")
return TRUE
@@ -557,15 +556,13 @@
/obj/structure/table/optable/proc/check_patient()
var/mob/M = locate(/mob/living/carbon/human, loc)
if(M)
if(M.resting)
if(!CHECK_BITFIELD(M.mobility_flags, MOBILITY_STAND))
patient = M
return 1
else
patient = null
return 0
/*
* Racks
*/
@@ -624,7 +621,7 @@
. = ..()
if(.)
return
if(user.IsKnockdown() || user.resting || user.lying || user.get_num_legs() < 2)
if(CHECK_MULTIPLE_BITFIELDS(user.mobility_flags, MOBILITY_STAND|MOBILITY_MOVE) || user.get_num_legs() < 2)
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src, ATTACK_EFFECT_KICK)

View File

@@ -343,7 +343,8 @@
set name = "Flip Windoor Assembly"
set category = "Object"
set src in oview(1)
if(usr.stat || !usr.canmove || usr.restrained())
var/mob/living/L = usr
if(!CHECK_BITFIELD(L, MOBILITY_PULL))
return
if(facing == "l")
@@ -354,4 +355,3 @@
to_chat(usr, "<span class='notice'>The windoor will now slide to the left.</span>")
update_icon()
return

View File

@@ -36,7 +36,7 @@
. = ..()
if(dropping == user && isliving(user))
var/mob/living/L = user
if(L.resting && do_after(L, max(10, L.getStaminaLoss()*0.5), 0, src))
if(!CHECK_BITFIELD(L.mobility_flags, MOBILITY_STAND) && do_after(L, max(10, L.getStaminaLoss()*0.5), 0, src))
if(Adjacent(L, src))
step(L, get_dir(L, src))
playsound(L, "rustle", 25, 1)

View File

@@ -81,12 +81,12 @@
if(H.movement_type & FLYING)
to_chat(H, "<span class='notice'>You settle gently back onto the ground...</span>")
A.ToggleFlight(H,0)
H.update_canmove()
H.update_mobility()
else
to_chat(H, "<span class='notice'>You beat your wings and begin to hover gently above the ground...</span>")
H.resting = 0
H.set_resting(FALSE, TRUE)
A.ToggleFlight(H,1)
H.update_canmove()
H.update_mobility()
/datum/species/angel/proc/flyslip(mob/living/carbon/human/H)
var/obj/buckled_obj

View File

@@ -691,7 +691,7 @@
/mob/living/resist_grab(moving_resist)
. = 1
if(pulledby.grab_state)
if(!resting && prob(30/pulledby.grab_state))
if(CHECK_BITFIELD(mobility_flags, MOBILITY_STAND) && prob(30/pulledby.grab_state))
visible_message("<span class='danger'>[src] has broken free of [pulledby]'s grip!</span>")
log_combat(pulledby, src, "broke grab")
pulledby.stop_pulling()

View File

@@ -98,13 +98,13 @@
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
var/restrained = restrained()
var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
var/canmove = !IsImmobilized() && !stun && conscious && !paralyzed && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && !IS_IN_STASIS(src) && (has_arms || ignore_legs || has_legs) && !pinned
var/canmove = !IsImmobilized() && !stun && conscious && !paralyze && !buckled && (!stat_softcrit || !pulledby) && !chokehold && !IsFrozen() && !IS_IN_STASIS(src) && (has_arms || ignore_legs || has_legs) && !pinned
if(canmove)
mobility_flags |= MOBILITY_MOVE
else
mobility_flags &= ~MOBILITY_MOVE
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyzed && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying)
var/canstand_involuntary = conscious && !stat_softcrit && !knockdown && !chokehold && !paralyze && (ignore_legs || has_legs) && !(buckled && buckled.buckle_lying)
var/canstand = canstand_involuntary && !resting
var/should_be_lying = !canstand
@@ -128,7 +128,7 @@
else
mobility_flags |= MOBILITY_UI|MOBILITY_PULL
var/canitem = !paralyzed && !stun && conscious && !chokehold && !restrained && has_arms
var/canitem = !paralyze && !stun && conscious && !chokehold && !restrained && has_arms
if(canitem)
mobility_flags |= (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE)
else

View File

@@ -25,8 +25,7 @@
if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
playsound(get_turf(user), 'sound/magic/ethereal_enter.ogg', 50, 1, -1)
visible_message("<span class='boldwarning'>[user] melts into the shadows!</span>")
user.SetStun(0, FALSE)
user.SetKnockdown(0, FALSE)
user.SetAllImmobility(0)
user.setStaminaLoss(0, 0)
var/obj/effect/dummy/phased_mob/shadow/S2 = new(get_turf(user.loc))
user.forceMove(S2)