From 6d80376affa58f704da94f49809bbe9b5d7c476b Mon Sep 17 00:00:00 2001 From: Whatstone Date: Wed, 5 Feb 2025 13:46:57 -0500 Subject: [PATCH] Silence, reagent dispenser --- .../Chemistry/EntitySystems/ReagentDispenserSystem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs index 26a3c3657f3..7d56c03c280 100644 --- a/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs @@ -38,6 +38,7 @@ public sealed class ReagentDispenserSystem : EntitySystem [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly OpenableSystem _openable = default!; [Dependency] private readonly LabelSystem _label = default!; // Frontier + [Dependency] private readonly SharedContainerSystem _containers = default!; // Frontier public override void Initialize() { @@ -279,8 +280,10 @@ private void OnMapInit(EntityUid uid, ReagentDispenserComponent component, MapIn { for (var i = 0; i < packPrototype.Inventory.Count && i < component.StorageSlots.Count; i++) { + if (component.StorageSlots[i].ContainerSlot == null) + continue; var item = Spawn(packPrototype.Inventory[i], Transform(uid).Coordinates); - if (!_itemSlotsSystem.TryInsert(uid, component.StorageSlots[i].ID!, item, null, excludeUserAudio: true)) + if (!_containers.Insert(item, component.StorageSlots[i].ContainerSlot!)) // ContainerSystem.Insert is silent. QueueDel(item); } }