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

@@ -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