Adding sorting to chem master (#34763)
* Adding sorting to chem master * Chem Master can now sort based on following categories - Alphabetical - Quantity - Time Added to Machine * Sorting is disabled by default and persist in the machine for everyone * Removed some pointless code from Chem Master's UI * Changed None and Time Added's text to reflect what they do better * Minor adjustments to the code requested by maintainers
This commit is contained in:
@@ -89,6 +89,18 @@ namespace Content.Shared.Chemistry
|
||||
Discard,
|
||||
}
|
||||
|
||||
public enum ChemMasterSortingType : byte
|
||||
{
|
||||
None = 0,
|
||||
Alphabetical = 1,
|
||||
Quantity = 2,
|
||||
Latest = 3,
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ChemMasterSortingTypeCycleMessage : BoundUserInterfaceMessage;
|
||||
|
||||
|
||||
public enum ChemMasterReagentAmount
|
||||
{
|
||||
U1 = 1,
|
||||
@@ -160,6 +172,8 @@ namespace Content.Shared.Chemistry
|
||||
|
||||
public readonly ChemMasterMode Mode;
|
||||
|
||||
public readonly ChemMasterSortingType SortingType;
|
||||
|
||||
public readonly FixedPoint2? BufferCurrentVolume;
|
||||
public readonly uint SelectedPillType;
|
||||
|
||||
@@ -168,7 +182,7 @@ namespace Content.Shared.Chemistry
|
||||
public readonly bool UpdateLabel;
|
||||
|
||||
public ChemMasterBoundUserInterfaceState(
|
||||
ChemMasterMode mode, ContainerInfo? inputContainerInfo, ContainerInfo? outputContainerInfo,
|
||||
ChemMasterMode mode, ChemMasterSortingType sortingType, ContainerInfo? inputContainerInfo, ContainerInfo? outputContainerInfo,
|
||||
IReadOnlyList<ReagentQuantity> bufferReagents, FixedPoint2 bufferCurrentVolume,
|
||||
uint selectedPillType, uint pillDosageLimit, bool updateLabel)
|
||||
{
|
||||
@@ -176,6 +190,7 @@ namespace Content.Shared.Chemistry
|
||||
OutputContainerInfo = outputContainerInfo;
|
||||
BufferReagents = bufferReagents;
|
||||
Mode = mode;
|
||||
SortingType = sortingType;
|
||||
BufferCurrentVolume = bufferCurrentVolume;
|
||||
SelectedPillType = selectedPillType;
|
||||
PillDosageLimit = pillDosageLimit;
|
||||
|
||||
Reference in New Issue
Block a user