From: Plykiya <58439124+Plykiya@users.noreply.github.com> Date: Thu, 13 Mar 2025 07:21:24 +0000 (-0700) Subject: Adds popup when firing gun while gun has no ammo (#34816) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=96501f4966bac690e2b845afdbf53a11fe812111;p=space-station-14.git Adds popup when firing gun while gun has no ammo (#34816) * Adds popup when firing gun while gun has no ammo * simplify --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --- diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index 231bac8302..ac6f27f7e9 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -350,10 +350,7 @@ public abstract partial class SharedGunSystem : EntitySystem // If they're firing an existing clip then don't play anything. if (shots > 0) { - if (ev.Reason != null && Timing.IsFirstTimePredicted) - { - PopupSystem.PopupCursor(ev.Reason); - } + PopupSystem.PopupCursor(ev.Reason ?? Loc.GetString("gun-magazine-fired-empty")); // Don't spam safety sounds at gun fire rate, play it at a reduced rate. // May cause prediction issues? Needs more tweaking diff --git a/Resources/Locale/en-US/weapons/ranged/gun.ftl b/Resources/Locale/en-US/weapons/ranged/gun.ftl index 31ac7d5bf2..10bc9e6c78 100644 --- a/Resources/Locale/en-US/weapons/ranged/gun.ftl +++ b/Resources/Locale/en-US/weapons/ranged/gun.ftl @@ -7,6 +7,7 @@ gun-disabled = You can't use guns! gun-clumsy = The gun blows up in your face! gun-set-fire-mode = Set to {$mode} gun-magazine-whitelist-fail = That won't fit into the gun! +gun-magazine-fired-empty = No ammo left! # SelectiveFire gun-SemiAuto = semi-auto