From c300b28abc0d976695693cf27a418845c66bac72 Mon Sep 17 00:00:00 2001 From: Sir Warock <67167466+SirWarock@users.noreply.github.com> Date: Mon, 29 Sep 2025 12:28:28 +0200 Subject: [PATCH] Fix Shotgun ammocount not updating (#40568) --- .../Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index 083cb2bf54..c9cbe5e6ac 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -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;