From 3fc81bca40fcf110011666c9cd83c61d737dc82c Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 13 Aug 2023 17:07:59 +1000 Subject: [PATCH] Fix bolt-less gun cycling (#19051) Oop. --- .../Ranged/Systems/SharedGunSystem.ChamberMagazine.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.ChamberMagazine.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.ChamberMagazine.cs index 17c32f639a..2b82e0051f 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.ChamberMagazine.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.ChamberMagazine.cs @@ -61,7 +61,7 @@ public abstract partial class SharedGunSystem private void OnChamberActivate(EntityUid uid, ChamberMagazineAmmoProviderComponent component, ActivateInWorldEvent args) { - if (args.Handled || component.BoltClosed == null) + if (args.Handled) return; args.Handled = true; @@ -70,7 +70,7 @@ public abstract partial class SharedGunSystem private void OnChamberUse(EntityUid uid, ChamberMagazineAmmoProviderComponent component, UseInHandEvent args) { - if (args.Handled || component.BoltClosed == null) + if (args.Handled) return; args.Handled = true; @@ -94,7 +94,7 @@ public abstract partial class SharedGunSystem private void UseChambered(EntityUid uid, ChamberMagazineAmmoProviderComponent component, EntityUid? user = null) { - if (component.BoltClosed == null || !component.BoltClosed.Value) + if (component.BoltClosed == false) return; if (TryTakeChamberEntity(uid, out var chamberEnt)) @@ -112,7 +112,7 @@ public abstract partial class SharedGunSystem CycleCartridge(uid, component, user); - if (component.BoltClosed.Value) + if (component.BoltClosed != false) { Audio.PlayPredicted(component.RackSound, uid, user); }