diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm
index 69e8b69e180..11f4a53a0d1 100644
--- a/code/modules/integrated_electronics/core/assemblies.dm
+++ b/code/modules/integrated_electronics/core/assemblies.dm
@@ -376,7 +376,7 @@
if(battery)
var/lost = battery.use(amount * CELLRATE)
net_power -= lost
- return lost > 0
+ return lost
return FALSE
// Ditto for giving.
diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm
index 59ef2d936b0..f15f9544f6d 100644
--- a/code/modules/integrated_electronics/core/printer.dm
+++ b/code/modules/integrated_electronics/core/printer.dm
@@ -17,6 +17,15 @@
var/obj/item/device/electronic_assembly/assembly_to_clone = null // Not implemented x3
var/dirty_items = FALSE
+/obj/item/device/integrated_circuit_printer/all_upgrades
+ upgraded = TRUE
+ illegal_upgraded = TRUE
+ can_clone = TRUE
+
+/obj/item/device/integrated_circuit_printer/illegal
+ illegal_upgraded = TRUE
+ can_clone = TRUE
+
/obj/item/device/integrated_circuit_printer/upgraded
upgraded = TRUE
can_clone = TRUE
@@ -25,6 +34,7 @@
name = "fractal integrated circuit printer"
desc = "A portable(ish) machine that makes modular circuitry seemingly out of thin air."
upgraded = TRUE
+ illegal_upgraded = TRUE
can_clone = TRUE
debug = TRUE
diff --git a/code/modules/integrated_electronics/subtypes/illegal.dm b/code/modules/integrated_electronics/subtypes/illegal.dm
index d28a0e0dd99..88e3a277d64 100644
--- a/code/modules/integrated_electronics/subtypes/illegal.dm
+++ b/code/modules/integrated_electronics/subtypes/illegal.dm
@@ -1,7 +1,121 @@
/obj/item/integrated_circuit/illegal
complexity = 3
- inputs = list("input" = IC_PINTYPE_STRING)
- outputs = list("result" = IC_PINTYPE_STRING)
- activators = list("compute" = IC_PINTYPE_PULSE_IN, "on computed" = IC_PINTYPE_PULSE_OUT)
category_text = "Illegal Parts"
- power_draw_per_use = 50
\ No newline at end of file
+ power_draw_per_use = 50
+
+/* [WIP]
+/obj/item/integrated_circuit/illegal/EPv2_Spoofer
+ name = "\improper EPv2 Spoofer circuit"
+ desc = "Enables the receiving of messages of other Exonet devices."
+ extended_desc = "An EPv2 address is a string with the format of XXXX:XXXX:XXXX:XXXX. Data can be received using the \
+ second pin, with additonal data reserved for the third pin. When a message is received, the second activation pin \
+ will pulse whatever's connected to it. Pulsing the first activation pin will set the given EPv2 address.\
+ \
+ Note: Receiving messages could cause the circuit to accidentally send malformed data to the target address."
+ icon_state = "signal_illegal"
+ complexity = 6
+ inputs = list("target EPv2 address" = IC_PINTYPE_STRING)
+ outputs = list(
+ "address received" = IC_PINTYPE_STRING,
+ "data received" = IC_PINTYPE_STRING,
+ "secondary text received" = IC_PINTYPE_STRING
+ )
+ activators = list("set spoof address" = IC_PINTYPE_PULSE_IN, "on data received" = IC_PINTYPE_PULSE_OUT)
+ spawn_flags = IC_SPAWN_RESEARCH|IC_SPAWN_ILLEGAL
+ origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2, TECH_ILLEGAL = 2)
+ power_draw_per_use = 200
+ var/datum/exonet_protocol/exonet = null
+ var/address_spoofed = FALSE
+
+/obj/item/integrated_circuit/illegal/EPv2_Spoofer/New()
+ ..()
+ exonet = new(src)
+ exonet.make_address("EPv2_Spoofer_circuit-\ref[src]")
+ desc += "
This circuit's EPv2 address is: [exonet.address]"
+
+/obj/item/integrated_circuit/illegal/EPv2_Spoofer/Destroy()
+ if(exonet)
+ if(!address_spoofed) // We dont actually want to destroy the regular address
+ exonet.remove_address()
+ qdel(exonet)
+ exonet = null
+ return ..()
+
+/obj/item/integrated_circuit/illegal/EPv2_Spoofer/do_work()
+ var/target_address = get_pin_data(IC_INPUT, 1)
+
+ exonet.address = target_address
+ address_spoofed = TRUE
+
+/obj/item/integrated_circuit/illegal/receive_exonet_message(var/atom/origin_atom, var/origin_address, var/message, var/text)
+ set_pin_data(IC_OUTPUT, 1, origin_address)
+ set_pin_data(IC_OUTPUT, 2, message)
+ set_pin_data(IC_OUTPUT, 3, text)
+
+ push_data()
+ activate_pin(2)
+
+ if(address_spoofed)
+ var/random = rand(1,100)
+ if(random > 70)
+ exonet.send_message(origin_address, message, "[random]")
+*/
+
+/obj/item/integrated_circuit/illegal/EPv2_Discoverer
+ name = "\improper EPv2 Discovery circuit"
+ desc = "Finds all Exonet devices currently connected to the node (even if not publicly listed)."
+ extended_desc = "An EPv2 address is a string with the format of XXXX:XXXX:XXXX:XXXX. Data can be received using the \
+ second pin, with additonal data reserved for the third pin. When a message is received, the second activation pin \
+ will pulse whatever's connected to it. Pulsing the first activation pin will set the given EPv2 address.\
+ \
+ Note: Discovering Exonet Devices sends off a ping to each device, making it a 'noisy' circuit."
+ icon_state = "signal_illegal"
+ complexity = 3
+ outputs = list("addresses found" = IC_PINTYPE_LIST)
+ activators = list("start discovery" = IC_PINTYPE_PULSE_IN, "on addresses found" = IC_PINTYPE_PULSE_OUT)
+ spawn_flags = IC_SPAWN_ILLEGAL
+ origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_MAGNET = 2, TECH_BLUESPACE = 2, TECH_ILLEGAL = 1)
+ power_draw_per_use = 300
+ var/datum/exonet_protocol/exonet = null
+ var/obj/machinery/exonet_node/node = null
+
+/obj/item/integrated_circuit/illegal/EPv2_Discoverer/proc/get_connection_to_tcomms()
+ if(node && node.on)
+ return can_telecomm(src,node)
+ return 0
+
+/obj/item/integrated_circuit/illegal/EPv2_Discoverer/New()
+ ..()
+ exonet = new(src)
+ exonet.make_address("EPv2_Discovery_circuit-\ref[src]")
+ desc += "
This circuit's EPv2 address is: [exonet.address]"
+ node = get_exonet_node()
+ message_admins("A EPv2 Discovery circuit has been created. \ref[src]")
+
+/obj/item/integrated_circuit/illegal/EPv2_Discoverer/Destroy()
+ if(exonet)
+ exonet.remove_address()
+ qdel(exonet)
+ exonet = null
+ return ..()
+
+/obj/item/integrated_circuit/illegal/EPv2_Discoverer/do_work()
+ if(!get_connection_to_tcomms())
+ set_pin_data(IC_OUTPUT, 1, null)
+
+ push_data()
+ activate_pin(2)
+ else
+ var/list/addresses = list()
+
+ for(var/datum/exonet_protocol/target_exonet in all_exonet_connections)
+ if(target_exonet.address && istext(target_exonet.address))
+ var/random = rand(200,350)
+ random = random / 10
+ exonet.send_message(target_exonet.address, "text", "64 bytes received from [exonet.address] ecmp_seq=1 ttl=51 time=[random] ms")
+ addresses += target_exonet.address
+
+ set_pin_data(IC_OUTPUT, 1, addresses)
+
+ push_data()
+ activate_pin(2)
\ No newline at end of file
diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm
index c4de28811ff..e53b1397de3 100644
--- a/code/modules/integrated_electronics/subtypes/input.dm
+++ b/code/modules/integrated_electronics/subtypes/input.dm
@@ -420,7 +420,7 @@
name = "\improper EPv2 circuit"
desc = "Enables the sending and receiving of messages on the Exonet with the EPv2 protocol."
extended_desc = "An EPv2 address is a string with the format of XXXX:XXXX:XXXX:XXXX. Data can be send or received using the \
- second pin on each side, with additonal data reserved for the third pin. When a message is received, the second activaiton pin \
+ second pin on each side, with additonal data reserved for the third pin. When a message is received, the second activation pin \
will pulse whatever's connected to it. Pulsing the first activation pin will send a message.\
\
When messaging Communicators, you must set data to send to the string `text` to avoid errors in reception."
diff --git a/icons/obj/integrated_electronics/electronic_components.dmi b/icons/obj/integrated_electronics/electronic_components.dmi
index b9b82061caf..07b0cec1b70 100644
Binary files a/icons/obj/integrated_electronics/electronic_components.dmi and b/icons/obj/integrated_electronics/electronic_components.dmi differ