diff --git a/code/__DEFINES/wiremod.dm b/code/__DEFINES/wiremod.dm index 0c853936e58..a6459d86bf4 100644 --- a/code/__DEFINES/wiremod.dm +++ b/code/__DEFINES/wiremod.dm @@ -119,5 +119,7 @@ #define DATATYPE_FLAG_ALLOW_MANUAL_INPUT (1<<0) /// The datatype won't update the value when it is connected to the port #define DATATYPE_FLAG_AVOID_VALUE_UPDATE (1<<1) +/// Allows the datatype to take entity values from the circuit multitool. +#define DATATYPE_FLAG_ALLOW_ATOM_INPUT (1<<2) /// The datatype has been generated and is an existing composite datatype -#define DATATYPE_FLAG_COMPOSITE (1<<2) +#define DATATYPE_FLAG_COMPOSITE (1<<3) diff --git a/code/modules/wiremod/core/integrated_circuit.dm b/code/modules/wiremod/core/integrated_circuit.dm index 116d3015879..85026b42bf7 100644 --- a/code/modules/wiremod/core/integrated_circuit.dm +++ b/code/modules/wiremod/core/integrated_circuit.dm @@ -468,7 +468,7 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit) return TRUE if(params["marked_atom"]) - if(port.datatype != PORT_TYPE_ATOM && port.datatype != PORT_TYPE_ANY) + if(!(port.datatype_handler.datatype_flags & DATATYPE_FLAG_ALLOW_ATOM_INPUT)) return var/obj/item/multitool/circuit/marker = usr.get_active_held_item() // Let's admins upload marked datums to an entity port. diff --git a/code/modules/wiremod/datatypes/any.dm b/code/modules/wiremod/datatypes/any.dm index 6ab5432cf24..6cc2d24ec34 100644 --- a/code/modules/wiremod/datatypes/any.dm +++ b/code/modules/wiremod/datatypes/any.dm @@ -1,7 +1,7 @@ /datum/circuit_datatype/any datatype = PORT_TYPE_ANY color = "blue" - datatype_flags = DATATYPE_FLAG_ALLOW_MANUAL_INPUT + datatype_flags = DATATYPE_FLAG_ALLOW_MANUAL_INPUT|DATATYPE_FLAG_ALLOW_ATOM_INPUT /datum/circuit_datatype/any/can_receive_from_datatype(datatype_to_check) return TRUE diff --git a/code/modules/wiremod/datatypes/datum.dm b/code/modules/wiremod/datatypes/datum.dm index 34a280490ce..f3faa8f5d8e 100644 --- a/code/modules/wiremod/datatypes/datum.dm +++ b/code/modules/wiremod/datatypes/datum.dm @@ -1,7 +1,7 @@ /datum/circuit_datatype/datum datatype = PORT_TYPE_DATUM color = "yellow" - datatype_flags = DATATYPE_FLAG_ALLOW_MANUAL_INPUT + datatype_flags = DATATYPE_FLAG_ALLOW_MANUAL_INPUT|DATATYPE_FLAG_ALLOW_ATOM_INPUT can_receive_from = list( PORT_TYPE_ATOM, ) diff --git a/code/modules/wiremod/datatypes/entity.dm b/code/modules/wiremod/datatypes/entity.dm index 44e00b9c6c4..e3a76892f97 100644 --- a/code/modules/wiremod/datatypes/entity.dm +++ b/code/modules/wiremod/datatypes/entity.dm @@ -1,7 +1,7 @@ /datum/circuit_datatype/entity datatype = PORT_TYPE_ATOM color = "purple" - datatype_flags = DATATYPE_FLAG_ALLOW_MANUAL_INPUT + datatype_flags = DATATYPE_FLAG_ALLOW_MANUAL_INPUT|DATATYPE_FLAG_ALLOW_ATOM_INPUT /datum/circuit_datatype/entity/convert_value(datum/port/port, value_to_convert) var/atom/object = value_to_convert diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.js b/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.js index 359f15da56c..0f433d552c2 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.js +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.js @@ -45,6 +45,18 @@ export const FUNDAMENTAL_DATA_TYPES = { /> ); }, + 'datum': (props, context) => { + const { name, setValue } = props; + return ( +