Interaction/Attack Hand Refactor (#36405)

This commit is contained in:
kevinz000
2018-03-23 03:20:54 -07:00
committed by AnturK
parent 80f6e451fc
commit f300a5c155
347 changed files with 1483 additions and 1186 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
//Vars that will not be copied when using /DuplicateObject
GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag","area","type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group","atmos_adjacent_turfs"))
GLOBAL_LIST_INIT(duplicate_forbidden_vars,list("tag", "datum_components", "area","type","loc","locs","vars", "parent","parent_type", "verbs","ckey","key","power_supply","contents","reagents","stat","x","y","z","group","atmos_adjacent_turfs"))
/proc/DuplicateObject(atom/original, perfectcopy = TRUE, sameloc = FALSE, atom/newloc = null, nerf = FALSE, holoitem=FALSE)
if(!original)
return null
return
var/atom/O
if(sameloc)
+6
View File
@@ -108,6 +108,9 @@
visible_message("<span class='warning'> [user] dunks [W] into \the [src]!</span>")
/obj/structure/holohoop/attack_hand(mob/user)
. = ..()
if(.)
return
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/L = user.pulling
if(user.grab_state < GRAB_AGGRESSIVE)
@@ -165,6 +168,9 @@
to_chat(user, "The device is a solid button, there's nothing you can do with it!")
/obj/machinery/readybutton/attack_hand(mob/user as mob)
. = ..()
if(.)
return
if(user.stat || stat & (NOPOWER|BROKEN))
to_chat(user, "<span class='warning'>This device is not powered!</span>")
return