This simplifies the code and makes the experience of examining contents easier without the reagent dispenser UI, as well as adding the possibility for dispensers to have items of heterogeneous sizes in them, which would allow configuring reagent dispensers to accept smaller containers such as beakers or vials in order to allow for more types of smaller quantities of reagents, or other flexibilities brought by using a standard storage component.
27 lines
992 B
C#
27 lines
992 B
C#
using Content.Shared.Whitelist;
|
|
using Content.Shared.Containers.ItemSlots;
|
|
using Content.Server.Chemistry.EntitySystems;
|
|
using Content.Shared.Chemistry;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Server.Chemistry.Components
|
|
{
|
|
/// <summary>
|
|
/// A machine that dispenses reagents into a solution container from containers in its storage slots.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
[Access(typeof(ReagentDispenserSystem))]
|
|
public sealed partial class ReagentDispenserComponent : Component
|
|
{
|
|
[DataField]
|
|
public ItemSlot BeakerSlot = new();
|
|
|
|
[DataField("clickSound"), ViewVariables(VVAccess.ReadWrite)]
|
|
public SoundSpecifier ClickSound = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public ReagentDispenserDispenseAmount DispenseAmount = ReagentDispenserDispenseAmount.U10;
|
|
}
|
|
}
|