Files
Delta-v/Content.Server/_Goobstation/Fax/FaxSignalSystem.cs
T
AlgisAlphonse f7db03182a Port goobstation factorio (#4035)
* Initial port of goobstation factorio, missing disposals integration and faxing. Also ports impstations modification for robotic arms to have static power draw. Also adds automation slots to silos and advanced microwave.

* Ports goobstation factorio fax automation, adds to the guidebook entry info about gas canisters.

* Ported Goob Disposals. Removed part about taking
mats out of storage silo cuz it ain't implemented
yet. Seems to work.

* Adds constructor circuitboard to research cuz I
forgor
2025-07-27 13:31:36 +01:00

35 lines
1.0 KiB
C#

// SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
// SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
// SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
using Content.Shared.DeviceLinking;
using Content.Shared.DeviceLinking.Events;
using Content.Shared.Fax;
using Content.Shared.Fax.Components;
using Robust.Shared.Prototypes;
namespace Content.Server._Goobstation.Fax;
/// <summary>
/// Handles signals for automated fax machines.
/// </summary>
public sealed class FaxSignalSystem : EntitySystem
{
public static readonly ProtoId<SinkPortPrototype> CopyPort = "FaxCopy";
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<FaxMachineComponent, SignalReceivedEvent>(OnSignalReceived);
}
private void OnSignalReceived(Entity<FaxMachineComponent> ent, ref SignalReceivedEvent args)
{
if (args.Port == CopyPort)
RaiseLocalEvent(ent, new FaxCopyMessage());
}
}