Files
OldThink/Content.Shared/Gravity/SharedGravityGeneratorComponent.cs

73 lines
1.6 KiB
C#
Raw Normal View History

using System;
2020-05-02 15:02:52 +01:00
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
2020-05-02 15:02:52 +01:00
using Robust.Shared.Serialization;
2021-06-09 22:19:39 +02:00
namespace Content.Shared.Gravity
2020-05-02 15:02:52 +01:00
{
[NetworkedComponent()]
public class SharedGravityGeneratorComponent : Component
2020-05-02 15:02:52 +01:00
{
public override string Name => "GravityGenerator";
/// <summary>
/// Sent to the server to set whether the generator should be on or off
/// </summary>
[Serializable, NetSerializable]
public class SwitchGeneratorMessage : BoundUserInterfaceMessage
{
public bool On;
public SwitchGeneratorMessage(bool on)
{
On = on;
}
}
/// <summary>
/// Sent to the server when requesting the status of the generator
/// </summary>
[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
}
2020-05-02 15:02:52 +01:00
}