[MIRROR] You can now non-violently place people on tables (#5891)

* You can now non-violently place people on tables (#36150)

* You can now non-violently place people on tables
This commit is contained in:
CitadelStationBot
2018-03-10 07:43:14 -06:00
committed by Poojawa
parent 0ebb1be847
commit e1823e1a40
+20 -5
View File
@@ -60,15 +60,23 @@
attack_hand(user)
/obj/structure/table/attack_hand(mob/living/user)
if(user.a_intent == INTENT_GRAB && user.pulling && isliving(user.pulling))
if(user.pulling && isliving(user.pulling))
var/mob/living/pushed_mob = user.pulling
if(pushed_mob.buckled)
to_chat(user, "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>")
return
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
return
tablepush(user, pushed_mob)
if(user.a_intent == INTENT_GRAB)
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
return
tablepush(user, pushed_mob)
if(user.a_intent == INTENT_HELP)
pushed_mob.visible_message("<span class='notice'>[user] begins to place [pushed_mob] onto [src]...</span>", \
"<span class='userdanger'>[user] begins to place [pushed_mob] onto [src]...</span>")
if(do_after(user, 35, target = pushed_mob))
tableplace(user, pushed_mob)
else
return
user.stop_pulling()
else
..()
@@ -89,6 +97,13 @@
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
/obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(src.loc)
pushed_mob.lay_down()
pushed_mob.visible_message("<span class='notice'>[user] places [pushed_mob] onto [src].</span>", \
"<span class='notice'>[user] places [pushed_mob] onto [src].</span>")
add_logs(user, pushed_mob, "placed")
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
pushed_mob.forceMove(src.loc)
pushed_mob.Knockdown(40)