using System; using Robust.Shared.GameObjects; using Robust.Shared.GameStates; using Robust.Shared.Serialization; namespace Content.Shared.Gravity { [NetworkedComponent()] public class SharedGravityGeneratorComponent : Component { public override string Name => "GravityGenerator"; /// /// Sent to the server to set whether the generator should be on or off /// [Serializable, NetSerializable] public class SwitchGeneratorMessage : BoundUserInterfaceMessage { public bool On; public SwitchGeneratorMessage(bool on) { On = on; } } /// /// Sent to the server when requesting the status of the generator /// [Serializable, NetSerializable] public class GeneratorStatusRequestMessage : BoundUserInterfaceMessage { public GeneratorStatusRequestMessage() { } } [Serializable, NetSerializable] public class GeneratorState : BoundUserInterfaceState { public bool On; public GeneratorState(bool on) { On = on; } } [Serializable, NetSerializable] public enum GravityGeneratorUiKey { Key } } [Serializable, NetSerializable] public enum GravityGeneratorVisuals { State, CoreVisible } [Serializable, NetSerializable] public enum GravityGeneratorStatus { Broken, Unpowered, Off, On } }