From 346539ba44b375e60d114ed0ecea4af80bb84601 Mon Sep 17 00:00:00 2001 From: Charlotte Tezuka Date: Sat, 17 Jan 2026 20:57:48 +0200 Subject: [PATCH] Last dance --- .../Systems/SharedGunSystem.Ballistic.cs | 9 +++---- Resources/Maps/packed.yml | 26 +++++++++---------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs index b2c3bb7a33..ce49a1fb66 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Ballistic.cs @@ -240,14 +240,11 @@ public abstract partial class SharedGunSystem for (var i = 0; i < args.Shots; i++) { EntityUid? ammoEntity = null; - - var existingEnt = component.Entities[^1]; - if (component.Entities.Count > 0) { - args.Ammo.Add((existingEnt, EnsureShootable(existingEnt))); if (!component.AutoCycle) //WL - if autocycle=false don't remove spent ammo from the gun break; + var existingEnt = component.Entities[^1]; component.Entities.RemoveAt(component.Entities.Count - 1); DirtyField(uid, component, nameof(BallisticAmmoProviderComponent.Entities)); Containers.Remove(existingEnt, component.Container); @@ -261,8 +258,8 @@ public abstract partial class SharedGunSystem //WL - if autocycle=false put spent ammo back in the gun if (!component.AutoCycle) { - component.Entities.Add(existingEnt); - Containers.Insert(existingEnt, component.Container); + component.Entities.Add(ammoEntity.Value); + Containers.Insert(ammoEntity.Value, component.Container); DirtyField(uid, component, nameof(BallisticAmmoProviderComponent.Entities)); } //WL - Autocycle end diff --git a/Resources/Maps/packed.yml b/Resources/Maps/packed.yml index b496895436..b8dcf34142 100644 --- a/Resources/Maps/packed.yml +++ b/Resources/Maps/packed.yml @@ -12029,19 +12029,19 @@ entities: parent: 2 - type: Fixtures fixtures: {} - - uid: 13173 - components: - - type: MetaData - name: APC (Engi - Telecomms) - - type: Transform - rot: 3.141592653589793 rad - pos: 18.5,-20.5 - parent: 2 - - type: AccessReader - accessListsOriginal: - - - Engineering - - type: Fixtures - fixtures: {} +# - uid: 13173 +# components: +# - type: MetaData +# name: APC (Engi - Telecomms) +# - type: Transform +# rot: 3.141592653589793 rad +# pos: 18.5,-20.5 +# parent: 2 +# - type: AccessReader +# accessListsOriginal: +# - - Engineering +# - type: Fixtures +# fixtures: {} - uid: 13549 components: - type: MetaData