Closing bolt no longer removes cartridge (#19251)

This commit is contained in:
Volodius
2023-08-20 14:32:19 +03:00
committed by GitHub
parent e467f2b556
commit 59cdcd0fe3

View File

@@ -198,10 +198,11 @@ public abstract partial class SharedGunSystem
{
// Try to put a new round in if possible.
var magEnt = GetMagazineEntity(uid);
var chambered = GetChamberEntity(uid);
// Similar to what takeammo does though that uses an optimised version where
// multiple bullets may be fired in a single tick.
if (magEnt != null)
if (magEnt != null && chambered == null)
{
var relayedArgs = new TakeAmmoEvent(1,
new List<(EntityUid? Entity, IShootable Shootable)>(),