From 2d53cfeabcc977938f217c303ce46a79d7fe80c9 Mon Sep 17 00:00:00 2001 From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Sat, 13 Apr 2024 08:26:25 -0700 Subject: [PATCH] Fix guns that spawn without a magazine looking like they have one (#26922) --- .../Weapons/Ranged/Systems/GunSystem.MagazineVisuals.cs | 2 +- Content.Shared/Strip/SharedStrippableSystem.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Content.Client/Weapons/Ranged/Systems/GunSystem.MagazineVisuals.cs b/Content.Client/Weapons/Ranged/Systems/GunSystem.MagazineVisuals.cs index 2d670d1e77..a81e8ae887 100644 --- a/Content.Client/Weapons/Ranged/Systems/GunSystem.MagazineVisuals.cs +++ b/Content.Client/Weapons/Ranged/Systems/GunSystem.MagazineVisuals.cs @@ -40,7 +40,7 @@ public sealed partial class GunSystem if (sprite == null) return; - if (!args.AppearanceData.TryGetValue(AmmoVisuals.MagLoaded, out var magloaded) || + if (args.AppearanceData.TryGetValue(AmmoVisuals.MagLoaded, out var magloaded) && magloaded is true) { if (!args.AppearanceData.TryGetValue(AmmoVisuals.AmmoMax, out var capacity)) diff --git a/Content.Shared/Strip/SharedStrippableSystem.cs b/Content.Shared/Strip/SharedStrippableSystem.cs index 74af0a1d87..59b24ec943 100644 --- a/Content.Shared/Strip/SharedStrippableSystem.cs +++ b/Content.Shared/Strip/SharedStrippableSystem.cs @@ -51,8 +51,7 @@ public abstract class SharedStrippableSystem : EntitySystem { args.CanDrop |= args.Target == args.User && HasComp(args.User) && - HasComp(args.User) && - HasComp(args.User); + HasComp(args.User); if (args.CanDrop) args.Handled = true;