Add auto modes to reagent grinder (#26290)

* Add auto-mode to reagent grinder

* Remove redundant stuff with DataField

* Use margin instead of dummy control

* Resolve grinder component
This commit is contained in:
Crotalus
2024-03-29 07:30:50 +01:00
committed by GitHub
parent cdfee5aa0c
commit a606909d30
7 changed files with 73 additions and 11 deletions

View File

@@ -10,6 +10,12 @@ namespace Content.Shared.Kitchen
public static string InputContainerId = "inputContainer";
}
[Serializable, NetSerializable]
public sealed class ReagentGrinderToggleAutoModeMessage : BoundUserInterfaceMessage
{
public ReagentGrinderToggleAutoModeMessage() { }
}
[Serializable, NetSerializable]
public sealed class ReagentGrinderStartMessage : BoundUserInterfaceMessage
{
@@ -75,6 +81,13 @@ namespace Content.Shared.Kitchen
Key
}
public enum GrinderAutoMode : byte
{
Off,
Grind,
Juice
}
[NetSerializable, Serializable]
public sealed class ReagentGrinderInterfaceState : BoundUserInterfaceState
{
@@ -85,13 +98,16 @@ namespace Content.Shared.Kitchen
public bool CanGrind;
public NetEntity[] ChamberContents;
public ReagentQuantity[]? ReagentQuantities;
public ReagentGrinderInterfaceState(bool isBusy, bool hasBeaker, bool powered, bool canJuice, bool canGrind, NetEntity[] chamberContents, ReagentQuantity[]? heldBeakerContents)
public GrinderAutoMode AutoMode;
public ReagentGrinderInterfaceState(bool isBusy, bool hasBeaker, bool powered, bool canJuice, bool canGrind, GrinderAutoMode autoMode, NetEntity[] chamberContents, ReagentQuantity[]? heldBeakerContents)
{
IsBusy = isBusy;
HasBeakerIn = hasBeaker;
Powered = powered;
CanJuice = canJuice;
CanGrind = canGrind;
AutoMode = autoMode;
ChamberContents = chamberContents;
ReagentQuantities = heldBeakerContents;
}