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
+1 -2
View File
@@ -116,5 +116,4 @@
return TRUE
/obj/item/device/assembly/interact(mob/user)
return //HTML MENU FOR WIRES GOES HERE
return ui_interact(user)
+2 -3
View File
@@ -73,7 +73,8 @@
STOP_PROCESSING(SSobj, src)
return
/obj/item/device/assembly/health/interact(mob/user as mob)//TODO: Change this to the wires thingy
/obj/item/device/assembly/health/ui_interact(mob/user as mob)//TODO: Change this to the wires thingy
. = ..()
if(!secured)
user.show_message("<span class='warning'>The [name] is unsecured!</span>")
return 0
@@ -82,8 +83,6 @@
dat += "<BR>Health: [health_scan]"
user << browse(dat, "window=hscan")
onclose(user, "hscan")
return
/obj/item/device/assembly/health/Topic(href, href_list)
..()
+3 -2
View File
@@ -74,11 +74,12 @@
a_right.holder_movement()
/obj/item/device/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
. = ..()
if(.)
return
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
..()
return
/obj/item/device/assembly_holder/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
+2 -1
View File
@@ -127,7 +127,8 @@
return
return refreshBeam()
/obj/item/device/assembly/infra/interact(mob/user)//TODO: change this this to the wire control panel
/obj/item/device/assembly/infra/ui_interact(mob/user)//TODO: change this this to the wire control panel
. = ..()
if(is_secured(user))
user.set_machine(src)
var/dat = "<TT><B>Infrared Laser</B>\n<B>Status</B>: [on ? "<A href='?src=[REF(src)];state=0'>On</A>" : "<A href='?src=[REF(src)];state=1'>Off</A>"]<BR>\n<B>Visibility</B>: [visible ? "<A href='?src=[REF(src)];visible=0'>Visible</A>" : "<A href='?src=[REF(src)];visible=1'>Invisible</A>"]<BR>\n</TT>"
+2 -1
View File
@@ -90,6 +90,7 @@
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
if(armed)
if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50))
@@ -100,7 +101,7 @@
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")
return
..()
return ..()
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
+2 -1
View File
@@ -93,7 +93,8 @@
holder.update_icon()
return
/obj/item/device/assembly/prox_sensor/interact(mob/user)//TODO: Change this to the wires thingy
/obj/item/device/assembly/prox_sensor/ui_interact(mob/user)//TODO: Change this to the wires thingy
. = ..()
if(is_secured(user))
var/second = time % 60
var/minute = (time - second) / 60
+2 -1
View File
@@ -48,7 +48,8 @@
holder.update_icon()
return
/obj/item/device/assembly/signaler/interact(mob/user, flag1)
/obj/item/device/assembly/signaler/ui_interact(mob/user, flag1)
. = ..()
if(is_secured(user))
var/t1 = "-------"
var/dat = {"
+2 -1
View File
@@ -79,7 +79,8 @@
holder.update_icon()
/obj/item/device/assembly/timer/interact(mob/user)//TODO: Have this use the wires
/obj/item/device/assembly/timer/ui_interact(mob/user)//TODO: Have this use the wires
. = ..()
if(is_secured(user))
var/second = time % 60
var/minute = (time - second) / 60