Files
fulpstation/code/modules/integrated_electronics/core/analyzer.dm
Trevor Serpas bee0b5b2c3 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
2018-07-07 02:00:25 -04:00

18 lines
915 B
Plaintext

/obj/item/integrated_electronics/analyzer
name = "circuit analyzer"
desc = "This tool can scan an assembly and generate code necessary to recreate it in a circuit printer."
icon = 'icons/obj/assemblies/electronic_tools.dmi'
icon_state = "analyzer"
flags_1 = CONDUCT_1
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)
to_chat(user, "<span class='notice'>You scan [A].</span>")
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>")