mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
Merge pull request #4464 from SirWarock/Fix-Ammo-Counter-on-Shotguns
Fix Shotgun ammocount not updating (#40568)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user