diff --git a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs index c68336deab..9d66338c8b 100644 --- a/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs +++ b/Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs @@ -718,9 +718,21 @@ public sealed partial class AdminVerbSystem Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Fun/caps.rsi"), "mag-6"), Act = () => { - _quickDialog.OpenDialog(player, "Set Bullet Amount", $"Amount (max {ballisticAmmo.Capacity}):", (int amount) => + _quickDialog.OpenDialog(player, "Set Bullet Amount", $"Amount (standard {ballisticAmmo.Capacity}):", (string amount) => { - ballisticAmmo.UnspawnedCount = amount; + if (!int.TryParse(amount, out var result)) + return; + + if (result > 0) + { + ballisticAmmo.UnspawnedCount = result; + } + else + { + ballisticAmmo.UnspawnedCount = 0; + } + + _gun.UpdateBallisticAppearance(args.Target, ballisticAmmo); }); }, Impact = LogImpact.Medium, diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index 261243fea3..11cfc88470 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -260,7 +260,7 @@ public abstract partial class SharedGunSystem args.Capacity = component.Capacity; } - private void UpdateBallisticAppearance(EntityUid uid, BallisticAmmoProviderComponent component) + public void UpdateBallisticAppearance(EntityUid uid, BallisticAmmoProviderComponent component) { if (!Timing.IsFirstTimePredicted || !TryComp(uid, out var appearance)) return;