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>
This commit is contained in:
Plykiya
2025-03-13 00:21:24 -07:00
committed by GitHub
parent 48a4aa3929
commit 96501f4966
2 changed files with 2 additions and 4 deletions

View File

@@ -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

View File

@@ -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