]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Shotgun ammocount not updating (#40568)
authorSir Warock <67167466+SirWarock@users.noreply.github.com>
Mon, 29 Sep 2025 10:28:28 +0000 (12:28 +0200)
committerGitHub <noreply@github.com>
Mon, 29 Sep 2025 10:28:28 +0000 (10:28 +0000)
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs

index f92c5ed3a2f0d13379611f5806f4e696766fda3a..62b68fed6edfc8c9a9e45ef6dee95a4f6fb73a7d 100644 (file)
@@ -58,6 +58,7 @@ public abstract partial class SharedGunSystem
         Audio.PlayPredicted(component.SoundInsert, uid, args.User);
         args.Handled = true;
         UpdateBallisticAppearance(uid, component);
+        UpdateAmmoCount(args.Target);
         DirtyField(uid, component, nameof(BallisticAmmoProviderComponent.Entities));
     }
 
@@ -153,7 +154,9 @@ public abstract partial class SharedGunSystem
                 Del(ent.Value);
         }
 
-        // repeat if there is more space in the target and more ammo to fill it
+        UpdateBallisticAppearance(args.Target.Value, component);
+        UpdateAmmoCount(args.Target.Value);
+        // repeat if there is more space in the target and more ammo to fill
         var moreSpace = target.Entities.Count + target.UnspawnedCount < target.Capacity;
         var moreAmmo = component.Entities.Count + component.UnspawnedCount > 0;
         args.Repeat = moreSpace && moreAmmo;