diff --git a/code/modules/wiremod/component.dm b/code/modules/wiremod/component.dm index 4d3c57c9877..d0446c69323 100644 --- a/code/modules/wiremod/component.dm +++ b/code/modules/wiremod/component.dm @@ -135,6 +135,9 @@ if(connected_port.datatype != output_port.datatype) output_port.set_datatype(connected_port.datatype) return TRUE + else + output_port.set_datatype(output_port.default_datatype) + return TRUE return FALSE diff --git a/code/modules/wiremod/port.dm b/code/modules/wiremod/port.dm index b0df9411b52..84f98d57445 100644 --- a/code/modules/wiremod/port.dm +++ b/code/modules/wiremod/port.dm @@ -15,6 +15,9 @@ /// The port type. Ports can only connect to each other if the type matches var/datatype + /// The default port type. Stores the original datatype of the port set on Initialize. + var/default_datatype + /// The port color. If unset, appears as blue. var/color @@ -28,6 +31,7 @@ src.connected_component = to_connect src.name = name src.datatype = datatype + src.default_datatype = datatype src.color = datatype_to_color()