Upload files
This commit is contained in:
@@ -34,14 +34,16 @@
|
||||
|
||||
/obj/item/assembly/proc/on_attach()
|
||||
|
||||
/obj/item/assembly/proc/on_detach() //call this when detaching it from a device. handles any special functions that need to be updated ex post facto
|
||||
///Call this when detaching it from a device. handles any special functions that need to be updated ex post facto
|
||||
/obj/item/assembly/proc/on_detach()
|
||||
if(!holder)
|
||||
return FALSE
|
||||
forceMove(holder.drop_location())
|
||||
holder = null
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/proc/holder_movement() //Called when the holder is moved
|
||||
///Called when the holder is moved
|
||||
/obj/item/assembly/proc/holder_movement()
|
||||
if(!holder)
|
||||
return FALSE
|
||||
setDir(holder.dir)
|
||||
@@ -53,7 +55,6 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
//Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
||||
/obj/item/assembly/proc/pulsed(radio = FALSE)
|
||||
if(wire_type & WIRE_RECEIVE)
|
||||
@@ -62,7 +63,6 @@
|
||||
INVOKE_ASYNC(src, .proc/activate)
|
||||
return TRUE
|
||||
|
||||
|
||||
//Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
|
||||
/obj/item/assembly/proc/pulse(radio = FALSE)
|
||||
if(connected && wire_type)
|
||||
@@ -74,7 +74,6 @@
|
||||
holder.process_activation(src, 0, 1)
|
||||
return TRUE
|
||||
|
||||
|
||||
// What the device does when turned on
|
||||
/obj/item/assembly/proc/activate()
|
||||
if(QDELETED(src) || !secured || (next_activate > world.time))
|
||||
@@ -82,13 +81,11 @@
|
||||
next_activate = world.time + activate_cooldown
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/assembly/proc/toggle_secure()
|
||||
secured = !secured
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
|
||||
/obj/item/assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(isassembly(W))
|
||||
var/obj/item/assembly/A = W
|
||||
@@ -115,7 +112,6 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>\The [src] [secured? "is secured and ready to be used!" : "can be attached to other things."]</span>"
|
||||
|
||||
|
||||
/obj/item/assembly/attack_self(mob/user)
|
||||
if(!user)
|
||||
return FALSE
|
||||
@@ -125,3 +121,11 @@
|
||||
|
||||
/obj/item/assembly/interact(mob/user)
|
||||
return ui_interact(user)
|
||||
|
||||
/obj/item/assembly/ui_host(mob/user)
|
||||
if(holder)
|
||||
return holder
|
||||
return src
|
||||
|
||||
/obj/item/assembly/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
@@ -88,14 +88,14 @@
|
||||
if(a_right)
|
||||
a_right.dropped(user)
|
||||
|
||||
/obj/item/assembly_holder/on_attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
|
||||
/obj/item/assembly_holder/on_attack_hand(user, act_intent)//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(a_left)
|
||||
a_left.attack_hand()
|
||||
a_left.attack_hand(user, act_intent)
|
||||
if(a_right)
|
||||
a_right.attack_hand()
|
||||
a_right.attack_hand(user, act_intent)
|
||||
|
||||
/obj/item/assembly_holder/screwdriver_act(mob/user, obj/item/tool)
|
||||
if(..())
|
||||
|
||||
Reference in New Issue
Block a user