using Content.Shared.Whitelist; using Content.Shared.Containers.ItemSlots; using Content.Server.Chemistry.EntitySystems; using Content.Shared.Chemistry; using Content.Shared.Chemistry.Dispenser; using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Prototypes; // Frontier using Content.Shared.Construction.Prototypes; // Frontier namespace Content.Server.Chemistry.Components { /// /// A machine that dispenses reagents into a solution container from containers in its storage slots. /// [RegisterComponent] [Access(typeof(ReagentDispenserSystem))] public sealed partial class ReagentDispenserComponent : Component { /// /// String with the pack name that stores the initial fill of the dispenser. The initial /// fill is added to the dispenser on MapInit. Note that we don't use ContainerFill because /// we have to generate the storage slots at MapInit first, then fill them. /// [DataField("pack", customTypeSerializer:typeof(PrototypeIdSerializer))] [ViewVariables(VVAccess.ReadWrite)] public string? PackPrototypeId = default!; /// /// Maximum number of internal storage slots. Dispenser can't store (or dispense) more than /// this many chemicals (without unloading and reloading). /// [DataField("numStorageSlots")] public int NumSlots = 25; /// /// For each created storage slot for the reagent containers being dispensed, apply this /// entity whitelist. Makes sure weird containers don't fit in the dispenser and that beakers /// don't accidentally get slotted into the source slots. /// [DataField] public EntityWhitelist? StorageWhitelist; [DataField] public ItemSlot BeakerSlot = new(); /// /// Prefix for automatically-generated slot name for storage, up to NumSlots. /// public static string BaseStorageSlotId = "ReagentDispenser-storageSlot"; /// /// List of storage slots that were created at MapInit. /// [DataField] public List StorageSlotIds = new List(); [DataField] public List StorageSlots = new List(); [DataField("clickSound"), ViewVariables(VVAccess.ReadWrite)] public SoundSpecifier ClickSound = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg"); [ViewVariables(VVAccess.ReadWrite)] public ReagentDispenserDispenseAmount DispenseAmount = ReagentDispenserDispenseAmount.U10; // Frontier: whether or not this entity can auto-label items [DataField] public bool CanAutoLabel; // Frontier: whether or not this entity is currently auto-labeling items [ViewVariables] public bool AutoLabel; /// /// Frontier: the number of storage slots a machine with base parts should have. /// [DataField] public int BaseNumStorageSlots = 25; /// /// Frontier: the number of extra slots a machine gets per tier of upgrades. /// [DataField] public int ExtraSlotsPerTier = 5; /// /// Frontier: the machine part type that upgrades the number of slots in the machine. /// [DataField] public ProtoId SlotUpgradeMachinePart = "MatterBin"; } }