LatheMessages.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Content.Shared.Research.Prototypes;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization;
  4. namespace Content.Shared.Lathe;
  5. [Serializable, NetSerializable]
  6. public sealed class LatheUpdateState : BoundUserInterfaceState
  7. {
  8. public List<ProtoId<LatheRecipePrototype>> Recipes;
  9. public List<LatheRecipePrototype> Queue;
  10. public LatheRecipePrototype? CurrentlyProducing;
  11. public LatheUpdateState(List<ProtoId<LatheRecipePrototype>> recipes, List<LatheRecipePrototype> queue, LatheRecipePrototype? currentlyProducing = null)
  12. {
  13. Recipes = recipes;
  14. Queue = queue;
  15. CurrentlyProducing = currentlyProducing;
  16. }
  17. }
  18. /// <summary>
  19. /// Sent to the server to sync material storage and the recipe queue.
  20. /// </summary>
  21. [Serializable, NetSerializable]
  22. public sealed class LatheSyncRequestMessage : BoundUserInterfaceMessage
  23. {
  24. }
  25. /// <summary>
  26. /// Sent to the server when a client queues a new recipe.
  27. /// </summary>
  28. [Serializable, NetSerializable]
  29. public sealed class LatheQueueRecipeMessage : BoundUserInterfaceMessage
  30. {
  31. public readonly string ID;
  32. public readonly int Quantity;
  33. public LatheQueueRecipeMessage(string id, int quantity)
  34. {
  35. ID = id;
  36. Quantity = quantity;
  37. }
  38. }
  39. [NetSerializable, Serializable]
  40. public enum LatheUiKey
  41. {
  42. Key,
  43. }