using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Serialization; namespace Content.Shared.Power.Generator; /// /// Enables a generator to switch between HV and MV output. /// /// /// Must have CableDeviceNodes for both and , and also a PowerSupplierComponent. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(SharedPowerSwitchableGeneratorSystem))] public sealed partial class PowerSwitchableGeneratorComponent : Component { /// /// Which output the portable generator is currently connected to. /// [DataField("activeOutput")] [AutoNetworkedField] public PowerSwitchableGeneratorOutput ActiveOutput { get; set; } /// /// Sound that plays when the output is switched. /// /// [DataField("switchSound")] public SoundSpecifier? SwitchSound { get; set; } /// /// Which node is the MV output? /// [DataField("nodeOutputMV")] public string NodeOutputMV { get; set; } = "output_mv"; /// /// Which node is the HV output? /// [DataField("nodeOutputHV")] public string NodeOutputHV { get; set; } = "output_hv"; } /// /// Possible power output for power-switchable generators. /// /// [Serializable, NetSerializable] public enum PowerSwitchableGeneratorOutput : byte { /// /// The generator is set to connect to a high-voltage power network. /// HV, /// /// The generator is set to connect to a medium-voltage power network. /// MV }