1
0

SharedMicrowave.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using Content.Shared.Chemistry.Reagent;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Kitchen.Components
  4. {
  5. [Serializable, NetSerializable]
  6. public sealed class MicrowaveStartCookMessage : BoundUserInterfaceMessage
  7. {
  8. }
  9. [Serializable, NetSerializable]
  10. public sealed class MicrowaveEjectMessage : BoundUserInterfaceMessage
  11. {
  12. }
  13. [Serializable, NetSerializable]
  14. public sealed class MicrowaveEjectSolidIndexedMessage : BoundUserInterfaceMessage
  15. {
  16. public NetEntity EntityID;
  17. public MicrowaveEjectSolidIndexedMessage(NetEntity entityId)
  18. {
  19. EntityID = entityId;
  20. }
  21. }
  22. [Serializable, NetSerializable]
  23. public sealed class MicrowaveVaporizeReagentIndexedMessage : BoundUserInterfaceMessage
  24. {
  25. public ReagentQuantity ReagentQuantity;
  26. public MicrowaveVaporizeReagentIndexedMessage(ReagentQuantity reagentQuantity)
  27. {
  28. ReagentQuantity = reagentQuantity;
  29. }
  30. }
  31. [Serializable, NetSerializable]
  32. public sealed class MicrowaveSelectCookTimeMessage : BoundUserInterfaceMessage
  33. {
  34. public int ButtonIndex;
  35. public uint NewCookTime;
  36. public MicrowaveSelectCookTimeMessage(int buttonIndex, uint inputTime)
  37. {
  38. ButtonIndex = buttonIndex;
  39. NewCookTime = inputTime;
  40. }
  41. }
  42. [NetSerializable, Serializable]
  43. public sealed class MicrowaveUpdateUserInterfaceState : BoundUserInterfaceState
  44. {
  45. public NetEntity[] ContainedSolids;
  46. public bool IsMicrowaveBusy;
  47. public int ActiveButtonIndex;
  48. public uint CurrentCookTime;
  49. public TimeSpan CurrentCookTimeEnd;
  50. public MicrowaveUpdateUserInterfaceState(NetEntity[] containedSolids,
  51. bool isMicrowaveBusy, int activeButtonIndex, uint currentCookTime, TimeSpan currentCookTimeEnd)
  52. {
  53. ContainedSolids = containedSolids;
  54. IsMicrowaveBusy = isMicrowaveBusy;
  55. ActiveButtonIndex = activeButtonIndex;
  56. CurrentCookTime = currentCookTime;
  57. CurrentCookTimeEnd = currentCookTimeEnd;
  58. }
  59. }
  60. [Serializable, NetSerializable]
  61. public enum MicrowaveVisualState
  62. {
  63. Idle,
  64. Cooking,
  65. Broken,
  66. Bloody
  67. }
  68. [NetSerializable, Serializable]
  69. public enum MicrowaveUiKey
  70. {
  71. Key
  72. }
  73. }