From: themias <89101928+themias@users.noreply.github.com> Date: Thu, 14 Dec 2023 20:49:40 +0000 (-0500) Subject: Fix spray nozzle (#22492) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=641c95f443e2078a3f168202c6285f1f19d99be2;p=space-station-14.git Fix spray nozzle (#22492) --- diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Clothing.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Clothing.cs index b9b21a4798..a144d96567 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Clothing.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Clothing.cs @@ -33,7 +33,11 @@ public partial class SharedGunSystem { slotEntity = null; - if (!_inventory.TryGetContainerSlotEnumerator(uid, out var enumerator, component.TargetSlot)) + if (!Containers.TryGetContainingContainer(uid, out var container)) + return false; + var user = container.Owner; + + if (!_inventory.TryGetContainerSlotEnumerator(user, out var enumerator, component.TargetSlot)) return false; while (enumerator.NextItem(out var item))