2021-07-17 02:37:09 +02:00
|
|
|
|
using System;
|
2020-09-13 14:23:52 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-08-29 06:05:44 -05:00
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Shared.AME
|
2020-08-29 06:05:44 -05:00
|
|
|
|
{
|
2022-02-16 00:23:23 -07:00
|
|
|
|
[Virtual]
|
2020-08-29 06:05:44 -05:00
|
|
|
|
public class SharedAMEControllerComponent : Component
|
|
|
|
|
|
{
|
|
|
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class AMEControllerBoundUserInterfaceState : BoundUserInterfaceState
|
2020-08-29 06:05:44 -05:00
|
|
|
|
{
|
|
|
|
|
|
public readonly bool HasPower;
|
|
|
|
|
|
public readonly bool IsMaster;
|
|
|
|
|
|
public readonly bool Injecting;
|
|
|
|
|
|
public readonly bool HasFuelJar;
|
|
|
|
|
|
public readonly int FuelAmount;
|
|
|
|
|
|
public readonly int InjectionAmount;
|
|
|
|
|
|
public readonly int CoreCount;
|
|
|
|
|
|
|
|
|
|
|
|
public AMEControllerBoundUserInterfaceState(bool hasPower, bool isMaster, bool injecting, bool hasFuelJar, int fuelAmount, int injectionAmount, int coreCount)
|
|
|
|
|
|
{
|
|
|
|
|
|
HasPower = hasPower;
|
|
|
|
|
|
IsMaster = isMaster;
|
|
|
|
|
|
Injecting = injecting;
|
|
|
|
|
|
HasFuelJar = hasFuelJar;
|
|
|
|
|
|
FuelAmount = fuelAmount;
|
|
|
|
|
|
InjectionAmount = injectionAmount;
|
|
|
|
|
|
CoreCount = coreCount;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class UiButtonPressedMessage : BoundUserInterfaceMessage
|
2020-08-29 06:05:44 -05:00
|
|
|
|
{
|
|
|
|
|
|
public readonly UiButton Button;
|
|
|
|
|
|
|
|
|
|
|
|
public UiButtonPressedMessage(UiButton button)
|
|
|
|
|
|
{
|
|
|
|
|
|
Button = button;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public enum AMEControllerUiKey
|
|
|
|
|
|
{
|
|
|
|
|
|
Key
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public enum UiButton
|
|
|
|
|
|
{
|
|
|
|
|
|
Eject,
|
|
|
|
|
|
ToggleInjection,
|
|
|
|
|
|
IncreaseFuel,
|
|
|
|
|
|
DecreaseFuel,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public enum AMEControllerVisuals
|
|
|
|
|
|
{
|
|
|
|
|
|
DisplayState,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|