diff --git a/code/__defines/integrated_circuits.dm b/code/__defines/integrated_circuits.dm index b2859a232d..03cfa358e3 100644 --- a/code/__defines/integrated_circuits.dm +++ b/code/__defines/integrated_circuits.dm @@ -1,3 +1,4 @@ // Methods of obtaining a circuit. #define IC_SPAWN_DEFAULT 1 // If the circuit comes in the default circuit box and able to be printed in the IC printer. -#define IC_SPAWN_RESEARCH 2 // If the circuit design will be available in the IC printer after upgrading it. \ No newline at end of file +#define IC_SPAWN_RESEARCH 2 // If the circuit design will be available in the IC printer after upgrading it. +#define IC_SPAWN_ILLEGAL 3 // If the circuit design will be available if upgrading the IC printer illegally. \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/printer.dm b/code/modules/integrated_electronics/core/printer.dm index 2089e87afb..77f0de7b04 100644 --- a/code/modules/integrated_electronics/core/printer.dm +++ b/code/modules/integrated_electronics/core/printer.dm @@ -11,6 +11,7 @@ var/debug = FALSE // If true, metal is infinite. var/upgraded = FALSE // When hit with an upgrade disk, will turn true, allowing it to print the higher tier circuits. + var/illegal_upgraded = FALSE // When hit with an illegal upgrade disk, will turn true, allowing it to print the illegal circuits. var/can_clone = FALSE // Same for above, but will allow the printer to duplicate a specific assembly. (Not implemented) // var/static/list/recipe_list = list() var/obj/item/device/electronic_assembly/assembly_to_clone = null // Not implemented x3 @@ -68,6 +69,16 @@ attack_self(user) return TRUE + if(istype(O,/obj/item/weapon/disk/integrated_circuit/upgrade/illegal)) + if(illegal_upgraded) + to_chat(user, span("warning", "\The [src] already has this upgrade.")) + return TRUE + to_chat(user, span("notice", "You install \the [O] into \the [src].")) + illegal_upgraded = TRUE + dirty_items = TRUE + attack_self(user) + return TRUE + if(istype(O,/obj/item/weapon/disk/integrated_circuit/upgrade/clone)) if(can_clone) to_chat(user, span("warning", "\The [src] already has this upgrade.")) @@ -212,6 +223,10 @@ name = "integrated circuit printer upgrade disk - advanced designs" desc = "Install this into your integrated circuit printer to enhance it. This one adds new, advanced designs to the printer." +/obj/item/weapon/disk/integrated_circuit/upgrade/illegal + name = "integrated circuit printer upgrade disk - illegal designs" + desc = "Install this into your integrated circuit printer to enhance it. This one adds new, but illegal designs to the printer." + // To be implemented later. /obj/item/weapon/disk/integrated_circuit/upgrade/clone name = "integrated circuit printer upgrade disk - circuit cloner"