diff --git a/code/__DEFINES/wiremod.dm b/code/__DEFINES/wiremod.dm index 5ccc49b39ad..5e44de2395d 100644 --- a/code/__DEFINES/wiremod.dm +++ b/code/__DEFINES/wiremod.dm @@ -109,6 +109,8 @@ #define CIRCUIT_FLAG_HIDDEN (1<<4) /// This circuit component has been marked as a component that has instant execution and will show up in the UI as so. This will only cause a visual change. #define CIRCUIT_FLAG_INSTANT (1<<5) +/// This circuit component can't be loaded in module component. Saves us some headaches. +#define CIRCUIT_FLAG_REFUSE_MODULE (1<<6) // Datatype flags /// The datatype supports manual inputs diff --git a/code/modules/wiremod/components/abstract/module.dm b/code/modules/wiremod/components/abstract/module.dm index 257028bd696..3566d619c9f 100644 --- a/code/modules/wiremod/components/abstract/module.dm +++ b/code/modules/wiremod/components/abstract/module.dm @@ -47,6 +47,9 @@ return ..() /obj/item/integrated_circuit/module/add_component(obj/item/circuit_component/to_add, mob/living/user) + if(to_add.circuit_flags & CIRCUIT_FLAG_REFUSE_MODULE) + balloon_alert(user, "doesn't fit into module!") + return . = ..() if(attached_module) attached_module.circuit_size += to_add.circuit_size diff --git a/code/modules/wiremod/components/action/mmi.dm b/code/modules/wiremod/components/action/mmi.dm index 991e90a7b17..e0ee407a7e1 100644 --- a/code/modules/wiremod/components/action/mmi.dm +++ b/code/modules/wiremod/components/action/mmi.dm @@ -6,6 +6,7 @@ /obj/item/circuit_component/mmi display_name = "Man-Machine Interface" desc = "A component that allows MMI to enter shells to send output signals." + circuit_flags = CIRCUIT_FLAG_REFUSE_MODULE /// The message to send to the MMI in the shell. var/datum/port/input/message diff --git a/code/modules/wiremod/core/component.dm b/code/modules/wiremod/core/component.dm index 5a6ac5ecc6e..b7a9fb5cfc1 100644 --- a/code/modules/wiremod/core/component.dm +++ b/code/modules/wiremod/core/component.dm @@ -82,7 +82,6 @@ if(circuit_flags & CIRCUIT_FLAG_INSTANT) ui_color = "orange" - /obj/item/circuit_component/Destroy() if(parent) // Prevents a Destroy() recursion @@ -97,6 +96,11 @@ QDEL_LIST(input_ports) return ..() +/obj/item/circuit_component/examine(mob/user) + . = ..() + if(circuit_flags & CIRCUIT_FLAG_REFUSE_MODULE) + . += span_notice("It's incompatible with module components.") + /** * Called when a shell is registered from the component/the component is added to a circuit. *