]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix spray nozzle (#22492)
authorthemias <89101928+themias@users.noreply.github.com>
Thu, 14 Dec 2023 20:49:40 +0000 (15:49 -0500)
committerGitHub <noreply@github.com>
Thu, 14 Dec 2023 20:49:40 +0000 (13:49 -0700)
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Clothing.cs

index b9b21a47981db87f413ea125e03539a90a1554ca..a144d965670a9d786d799f99c3feb475ece03106 100644 (file)
@@ -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))