From bc17911eaca415002117105a3f7ee54a668f5a9e Mon Sep 17 00:00:00 2001 From: Chinsky Date: Fri, 4 Jan 2013 09:06:33 +0400 Subject: [PATCH] Added ability to slam people against the tables --- code/game/objects/structures/tables_racks.dm | 23 ++++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index db8bfa183a1..1f0bc8678ad 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -333,14 +333,23 @@ /obj/structure/table/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) var/obj/item/weapon/grab/G = W - if(G.state<2) - user << "\red You need a better grip to do that!" + if (istype(G.affecting, /mob/living)) + var/mob/living/M = G.affecting + if (G.state < 2) + if(user.a_intent == "hurt") + if (prob(5)) M.Weaken(3) + M.apply_damage(10) + visible_message("\red [G.assailant] slams [G.affecting] against \the [src]!") + playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1) + else + user << "\red You need a better grip to do that!" + return + else + G.affecting.loc = src.loc + G.affecting.Weaken(5) + visible_message("\red [G.assailant] puts [G.affecting] on \the [src].") + del(W) return - G.affecting.loc = src.loc - G.affecting.Weaken(5) - visible_message("\red [G.assailant] puts [G.affecting] on the table.") - del(W) - return if (istype(W, /obj/item/weapon/wrench)) user << "\blue Now disassembling table"