mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fixed being able to throw people on table past blast doors and other such obstacles (#30567)
This commit is contained in:
@@ -381,6 +381,16 @@
|
|||||||
return
|
return
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/obj/structure/table/proc/TryToThrowOnTable(var/mob/user,var/mob/victim)
|
||||||
|
for (var/atom/A in loc)
|
||||||
|
if (A == src)
|
||||||
|
continue
|
||||||
|
if (A.density)
|
||||||
|
to_chat(user, "<span class='warning'>\The [A] prevents you from dragging \the [victim] on top of \the [src]</span>")
|
||||||
|
return FALSE
|
||||||
|
victim.forceMove(loc)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, params)
|
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||||
if (!W)
|
if (!W)
|
||||||
return
|
return
|
||||||
@@ -391,7 +401,8 @@
|
|||||||
var/mob/living/M = G.affecting
|
var/mob/living/M = G.affecting
|
||||||
if (G.state < GRAB_AGGRESSIVE)
|
if (G.state < GRAB_AGGRESSIVE)
|
||||||
if(user.a_intent == I_HURT)
|
if(user.a_intent == I_HURT)
|
||||||
M.forceMove(loc)
|
if (!TryToThrowOnTable(user,M))
|
||||||
|
return
|
||||||
if (prob(15))
|
if (prob(15))
|
||||||
M.Knockdown(5)
|
M.Knockdown(5)
|
||||||
M.Stun(5)
|
M.Stun(5)
|
||||||
@@ -403,7 +414,8 @@
|
|||||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
M.forceMove(loc)
|
if (!TryToThrowOnTable(user,M))
|
||||||
|
return
|
||||||
M.Knockdown(5)
|
M.Knockdown(5)
|
||||||
M.Stun(5)
|
M.Stun(5)
|
||||||
visible_message("<span class='warning'>[user] puts [M] on \the [src].</span>")
|
visible_message("<span class='warning'>[user] puts [M] on \the [src].</span>")
|
||||||
@@ -658,7 +670,8 @@
|
|||||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
G.affecting.forceMove(loc)
|
if (!TryToThrowOnTable(user,G.affecting))
|
||||||
|
return
|
||||||
G.affecting.Knockdown(5)
|
G.affecting.Knockdown(5)
|
||||||
G.affecting.Stun(5)
|
G.affecting.Stun(5)
|
||||||
visible_message("<span class='warning'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
visible_message("<span class='warning'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||||
|
|||||||
Reference in New Issue
Block a user