Files
wwdpublic/Content.Server/Chemistry/Components/ChemMasterComponent.cs
Dora decd389858 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

(cherry picked from commit 53dc27cb1e16d119ed72f1cc75e1004c57e3a24e)
2025-10-04 12:51:06 +03:00

40 lines
1.3 KiB
C#

using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Chemistry;
using Robust.Shared.Audio;
namespace Content.Server.Chemistry.Components
{
/// <summary>
/// An industrial grade chemical manipulator with pill and bottle production included.
/// <seealso cref="ChemMasterSystem"/>
/// </summary>
[RegisterComponent]
[Access(typeof(ChemMasterSystem))]
public sealed partial class ChemMasterComponent : Component
{
[DataField("pillType"), ViewVariables(VVAccess.ReadWrite)]
public uint PillType = 0;
[DataField("mode"), ViewVariables(VVAccess.ReadWrite)]
public ChemMasterMode Mode = ChemMasterMode.Transfer;
[DataField]
public ChemMasterSortingType SortingType = ChemMasterSortingType.None;
[DataField("pillDosageLimit", required: true), ViewVariables(VVAccess.ReadWrite)]
public uint PillDosageLimit;
[DataField("clickSound"), ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier ClickSound = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
[DataField]
public int TransferringAmount = 1;
[DataField]
public List<int> Amounts = new()
{
1, 5, 10, 15, 20, 25, 30, 50
};
}
}