Traits framework (#12548)

This commit is contained in:
Fox McCloud
2019-10-15 20:12:46 -04:00
committed by variableundefined
parent c2a963d7a8
commit d6a6debf94
47 changed files with 557 additions and 86 deletions
+6 -4
View File
@@ -181,9 +181,11 @@
step(O, get_dir(O, src))
return
/obj/structure/table/proc/tablepush(obj/item/I, mob/user)
/obj/structure/table/proc/tablepush(obj/item/grab/G, mob/user)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='danger'>Throwing [G.affecting] onto the table might hurt them!</span>")
return
if(get_dist(src, user) < 2)
var/obj/item/grab/G = I
if(G.affecting.buckled)
to_chat(user, "<span class='warning'>[G.affecting] is buckled to [G.affecting.buckled]!</span>")
return FALSE
@@ -202,9 +204,9 @@
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
add_attack_logs(G.assailant, G.affecting, "Pushed onto a table")
qdel(I)
qdel(G)
return TRUE
qdel(I)
qdel(G)
/obj/structure/table/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/grab))