SharedAmeControllerComponent.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using Robust.Shared.Serialization;
  2. namespace Content.Shared.Ame.Components;
  3. [Virtual]
  4. public partial class SharedAmeControllerComponent : Component
  5. {
  6. public const string FuelSlotId = "fuelSlot";
  7. }
  8. [Serializable, NetSerializable]
  9. public sealed class AmeControllerBoundUserInterfaceState : BoundUserInterfaceState
  10. {
  11. public readonly bool HasPower;
  12. public readonly bool IsMaster;
  13. public readonly bool Injecting;
  14. public readonly bool HasFuelJar;
  15. public readonly int FuelAmount;
  16. public readonly int InjectionAmount;
  17. public readonly int CoreCount;
  18. public readonly float CurrentPowerSupply;
  19. public readonly float TargetedPowerSupply;
  20. public AmeControllerBoundUserInterfaceState(bool hasPower, bool isMaster, bool injecting, bool hasFuelJar, int fuelAmount, int injectionAmount, int coreCount, float currentPowerSupply, float targetedPowerSupply)
  21. {
  22. HasPower = hasPower;
  23. IsMaster = isMaster;
  24. Injecting = injecting;
  25. HasFuelJar = hasFuelJar;
  26. FuelAmount = fuelAmount;
  27. InjectionAmount = injectionAmount;
  28. CoreCount = coreCount;
  29. CurrentPowerSupply = currentPowerSupply;
  30. TargetedPowerSupply = targetedPowerSupply;
  31. }
  32. }
  33. [Serializable, NetSerializable]
  34. public sealed class UiButtonPressedMessage : BoundUserInterfaceMessage
  35. {
  36. public readonly UiButton Button;
  37. public UiButtonPressedMessage(UiButton button)
  38. {
  39. Button = button;
  40. }
  41. }
  42. [Serializable, NetSerializable]
  43. public enum AmeControllerUiKey
  44. {
  45. Key
  46. }
  47. public enum UiButton
  48. {
  49. Eject,
  50. ToggleInjection,
  51. IncreaseFuel,
  52. DecreaseFuel,
  53. }
  54. [Serializable, NetSerializable]
  55. public enum AmeControllerVisuals
  56. {
  57. DisplayState,
  58. }
  59. [Serializable, NetSerializable]
  60. public enum AmeControllerState
  61. {
  62. On,
  63. Warning,
  64. Critical,
  65. Fuck,
  66. Off,
  67. }