diff --git a/Content.Server/Disposal/Tube/DisposalSignallerComponent.cs b/Content.Server/Disposal/Tube/DisposalSignallerComponent.cs
new file mode 100644
index 0000000000..ff13a942dc
--- /dev/null
+++ b/Content.Server/Disposal/Tube/DisposalSignallerComponent.cs
@@ -0,0 +1,14 @@
+using Content.Shared.DeviceLinking;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.Disposal.Tube;
+
+///
+/// Disposal pipes with this component can be linked with devices to send a signal every time an item goes through the pipe
+///
+[RegisterComponent, Access(typeof(DisposalSignallerSystem))]
+public sealed partial class DisposalSignallerComponent : Component
+{
+ [DataField]
+ public ProtoId Port = "ItemDetected";
+}
diff --git a/Content.Server/Disposal/Tube/DisposalSignallerSystem.cs b/Content.Server/Disposal/Tube/DisposalSignallerSystem.cs
new file mode 100644
index 0000000000..76c3c47ab4
--- /dev/null
+++ b/Content.Server/Disposal/Tube/DisposalSignallerSystem.cs
@@ -0,0 +1,25 @@
+using Content.Server.DeviceLinking.Systems;
+
+namespace Content.Server.Disposal.Tube;
+
+public sealed class DisposalSignallerSystem : EntitySystem
+{
+ [Dependency] private readonly DeviceLinkSystem _link = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+ SubscribeLocalEvent(OnInit);
+ SubscribeLocalEvent(OnGetNextDirection, after: new[] { typeof(DisposalTubeSystem) });
+ }
+
+ private void OnInit(EntityUid uid, DisposalSignallerComponent comp, ComponentInit args)
+ {
+ _link.EnsureSourcePorts(uid, comp.Port);
+ }
+
+ private void OnGetNextDirection(EntityUid uid, DisposalSignallerComponent comp, ref GetDisposalsNextDirectionEvent args)
+ {
+ _link.InvokePort(uid, comp.Port);
+ }
+}
diff --git a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl
index 1d879fcee9..89a978479e 100644
--- a/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl
+++ b/Resources/Locale/en-US/machine-linking/transmitter_ports.ftl
@@ -69,3 +69,6 @@ signal-port-description-power-charging = This port is invoked with HIGH when the
signal-port-name-power-discharging = Discharging
signal-port-description-power-discharging = This port is invoked with HIGH when the battery is losing charge and LOW when not.
+
+signal-port-name-item-detected = Detected
+signal-port-description-item-detected = This port is invoked whenever the transmitter detects an item.
diff --git a/Resources/Prototypes/DeviceLinking/source_ports.yml b/Resources/Prototypes/DeviceLinking/source_ports.yml
index ae7fb31408..4a460e722d 100644
--- a/Resources/Prototypes/DeviceLinking/source_ports.yml
+++ b/Resources/Prototypes/DeviceLinking/source_ports.yml
@@ -156,3 +156,9 @@
id: PowerDischarging
name: signal-port-name-power-discharging
description: signal-port-description-power-discharging
+
+- type: sourcePort
+ id: ItemDetected
+ name: signal-port-name-item-detected
+ description: signal-port-description-item-detected
+ defaultLinks: [ Toggle, Trigger, Timer ]
diff --git a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml
index bb7b08cc2c..839247fc3f 100644
--- a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml
+++ b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml
@@ -151,6 +151,43 @@
containers:
- DisposalTagger
+- type: entity
+ id: DisposalSignaller
+ parent: DisposalPipeBase
+ name: disposal signaller
+ description: A pipe that emits a signal when in item goes through it.
+ components:
+ - type: Sprite
+ layers:
+ - map: [ "pipe" ]
+ state: conpipe-signaller
+ - type: DisposalTube
+ containerId: DisposalTransit
+ - type: DisposalTransit
+ - type: DeviceNetwork
+ deviceNetId: Wireless
+ receiveFrequencyId: BasicDevice
+ - type: DeviceLinkSource
+ ports:
+ - ItemDetected
+ - type: WirelessNetworkConnection
+ range: 200
+ - type: DisposalSignaller
+ - type: ContainerContainer
+ containers:
+ DisposalTransit: !type:Container
+ - type: GenericVisualizer
+ visuals:
+ enum.DisposalTubeVisuals.VisualState:
+ pipe:
+ Free: { state: conpipe-signaller }
+ Anchored: { state: pipe-signaller }
+ - type: Construction
+ graph: DisposalPipe
+ node: pipe
+ containers:
+ - DisposalTransit
+
- type: entity
id: DisposalTrunk
parent: DisposalPipeBase
diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_pipes.yml b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_pipes.yml
index 41ec858a1a..83c562fc96 100644
--- a/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_pipes.yml
+++ b/Resources/Prototypes/Recipes/Construction/Graphs/utilities/disposal_pipes.yml
@@ -14,6 +14,14 @@
- material: Steel
amount: 2
doAfter: 1
+ - to: signaller
+ steps:
+ - material: Steel
+ amount: 2
+ doAfter: 1
+ - material: Cable
+ amount: 1
+ doAfter: 1
- to: trunk
steps:
- material: Steel
@@ -108,6 +116,20 @@
steps:
- tool: Welding
doAfter: 1
+ - node: signaller
+ entity: DisposalSignaller
+ edges:
+ - to: start
+ completed:
+ - !type:SpawnPrototype
+ prototype: SheetSteel1
+ amount: 2
+ - !type:SpawnPrototype
+ prototype: CableApcStack1 # I have no idea why this does not work
+ - !type:DeleteEntity
+ steps:
+ - tool: Welding
+ doAfter: 1
- node: trunk
entity: DisposalTrunk
edges:
diff --git a/Resources/Prototypes/Recipes/Construction/utilities.yml b/Resources/Prototypes/Recipes/Construction/utilities.yml
index 0feffe998d..575ca3ae4e 100644
--- a/Resources/Prototypes/Recipes/Construction/utilities.yml
+++ b/Resources/Prototypes/Recipes/Construction/utilities.yml
@@ -119,6 +119,15 @@
placementMode: SnapgridCenter
canBuildInImpassable: false
+- type: construction
+ id: DisposalSignaller
+ graph: DisposalPipe
+ startNode: start
+ targetNode: signaller
+ category: construction-category-utilities
+ placementMode: SnapgridCenter
+ canBuildInImpassable: false
+
- type: construction
id: DisposalTrunk
graph: DisposalPipe
diff --git a/Resources/Textures/Structures/Piping/disposal.rsi/conpipe-signaller.png b/Resources/Textures/Structures/Piping/disposal.rsi/conpipe-signaller.png
new file mode 100644
index 0000000000..fe84a8977a
Binary files /dev/null and b/Resources/Textures/Structures/Piping/disposal.rsi/conpipe-signaller.png differ
diff --git a/Resources/Textures/Structures/Piping/disposal.rsi/meta.json b/Resources/Textures/Structures/Piping/disposal.rsi/meta.json
index 7fce39e694..55d687bc2e 100644
--- a/Resources/Textures/Structures/Piping/disposal.rsi/meta.json
+++ b/Resources/Textures/Structures/Piping/disposal.rsi/meta.json
@@ -5,7 +5,7 @@
"y": 32
},
"license": "CC-BY-SA-3.0",
- "copyright": "https://github.com/discordia-space/CEV-Eris/blob/bbe32606902c90f5290b57d905a3f31b84dc6d7d/icons/obj/pipes/disposal.dmi and modified by DrSmugleaf. Signal router sprites based on normal router modified by deltanedas (github). disposal bins by EmoGarbage404 (github). pipe-x pipe-xf, conpipe-x by K-Dynamic (github).",
+ "copyright": "https://github.com/discordia-space/CEV-Eris/blob/bbe32606902c90f5290b57d905a3f31b84dc6d7d/icons/obj/pipes/disposal.dmi and modified by DrSmugleaf. Signal router sprites based on normal router modified by deltanedas (github). disposal bins by EmoGarbage404 (github). pipe-x pipe-xf, conpipe-x by K-Dynamic (github). Signaler sprites based on tagger modified by Wolfkey",
"states": [
{
"name": "condisposal",
@@ -51,6 +51,10 @@
"name": "conpipe-tagger",
"directions": 4
},
+ {
+ "name": "conpipe-signaller",
+ "directions": 4
+ },
{
"name": "conpipe-y",
"directions": 4
@@ -323,6 +327,52 @@
"name": "pipe-tagger-partial",
"directions": 4
},
+ {
+ "name": "pipe-signaller",
+ "directions": 4,
+ "delays": [
+ [
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141
+ ],
+ [
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141
+ ],
+ [
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141
+ ],
+ [
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141,
+ 0.1,
+ 0.141
+ ]
+ ]
+ },
{
"name": "pipe-tf",
"directions": 4
diff --git a/Resources/Textures/Structures/Piping/disposal.rsi/pipe-signaller.png b/Resources/Textures/Structures/Piping/disposal.rsi/pipe-signaller.png
new file mode 100644
index 0000000000..76b177234b
Binary files /dev/null and b/Resources/Textures/Structures/Piping/disposal.rsi/pipe-signaller.png differ