mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Afterattack() Signal (#38606)
* adds signal and modifies each call of afterattack to call it's inherited proc * uses new macro for sendsignal() * map fuck * skip precommithooks * combine and negate 2 ifs
This commit is contained in:
committed by
Emmett Gaines
parent
e2093f11f5
commit
bee0b5b2c3
@@ -7,6 +7,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/integrated_electronics/analyzer/afterattack(var/atom/A, var/mob/living/user)
|
||||
. = ..()
|
||||
if(istype(A, /obj/item/electronic_assembly))
|
||||
var/saved = "[A.name] analyzed! On circuit printers with cloning enabled, you may use the code below to clone the circuit:<br><br><code>[SScircuit.save_electronic_assembly(A)]</code>"
|
||||
if(saved)
|
||||
@@ -14,5 +15,3 @@
|
||||
user << browse(saved, "window=circuit_scan;size=500x600;border=1;can_resize=1;can_close=1;can_minimize=1")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[A] is not complete enough to be encoded!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -420,6 +420,7 @@
|
||||
|
||||
|
||||
/obj/item/electronic_assembly/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
for(var/obj/item/integrated_circuit/input/S in assembly_components)
|
||||
if(S.sense(target,user,proximity))
|
||||
visible_message("<span class='notice'> [user] waves [src] around [target].</span>")
|
||||
|
||||
@@ -38,14 +38,13 @@
|
||||
to_chat(user, "<span class='notice'>You set \the [src]'s memory to absolutely nothing.</span>")
|
||||
|
||||
/obj/item/integrated_electronics/debugger/afterattack(atom/target, mob/living/user, proximity)
|
||||
. = ..()
|
||||
if(accepting_refs && proximity)
|
||||
data_to_write = WEAKREF(target)
|
||||
visible_message("<span class='notice'>[user] slides \a [src]'s over \the [target].</span>")
|
||||
to_chat(user, "<span class='notice'>You set \the [src]'s memory to a reference to [target.name] \[Ref\]. The ref scanner is \
|
||||
now off.</span>")
|
||||
accepting_refs = FALSE
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/integrated_electronics/debugger/proc/write_data(var/datum/integrated_io/io, mob/user)
|
||||
if(io.io_type == DATA_CHANNEL)
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
to_chat(user, "<span class='notice'>You set \the [src]'s memory to absolutely nothing.</span>")
|
||||
|
||||
/obj/item/integrated_circuit/memory/constant/afterattack(atom/target, mob/living/user, proximity)
|
||||
. = ..()
|
||||
if(accepting_refs && proximity)
|
||||
var/datum/integrated_io/O = outputs[1]
|
||||
O.data = WEAKREF(target)
|
||||
|
||||
Reference in New Issue
Block a user