// SPDX-FileCopyrightText: 2025 GoobBot // SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> // 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 Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared._Goobstation.Factory; /// /// Machine that can be started with a signal. /// [RegisterComponent, NetworkedComponent, Access(typeof(StartableMachineSystem))] public sealed partial class StartableMachineComponent : Component { /// /// Port you invoke to start the machine and raise . /// [DataField] public ProtoId StartPort = "Start"; /// /// Controls . /// Pulses toggle instead of setting true/false. /// [DataField] public ProtoId AutoStartPort = "AutoStart"; /// /// Whether starting will work when TryAutoStart is called. /// /// /// Signals aren't predicted yet so not networked. /// [DataField(serverOnly: true)] public bool AutoStart; /// /// Queues an auto start for the next tick. /// [DataField(serverOnly: true)] public bool AutoStartQueued; [DataField] public ProtoId StartedPort = "Started"; [DataField] public ProtoId CompletedPort = "Completed"; [DataField] public ProtoId FailedPort = "Failed"; } /// /// Raised on the server when the start port is invoked while powered. /// [ByRefEvent] public readonly record struct MachineStartedEvent();