mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Added ability to slam people against the tables
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user