From 27b3ca04c5b181d42e98ce703e81f027dda0f19e Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 4 Jun 2022 14:19:08 +1000 Subject: [PATCH] Revolver fix (again) (#8635) --- .../Weapons/Ranged/Systems/SharedGunSystem.Revolver.cs | 7 ++----- Resources/Locale/en-US/weapons/ranged/gun.ftl | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Revolver.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Revolver.cs index 7dff724148..13a18ebbde 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Revolver.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Revolver.cs @@ -54,13 +54,8 @@ public partial class SharedGunSystem var oldIndex = component.CurrentIndex; component.CurrentIndex = state.CurrentIndex; - - component.AmmoSlots.EnsureCapacity(state.AmmoSlots.Count); - component.AmmoSlots.Clear(); component.Chambers = new bool?[state.Chambers.Length]; - DebugTools.Assert(component.AmmoSlots.Count == component.Chambers.Length); - // Need to copy across the state rather than the ref. for (var i = 0; i < component.AmmoSlots.Count; i++) { @@ -322,6 +317,8 @@ public partial class SharedGunSystem component.Chambers[i] = true; } } + + DebugTools.Assert(component.AmmoSlots.Count == component.Capacity); } [Serializable, NetSerializable] diff --git a/Resources/Locale/en-US/weapons/ranged/gun.ftl b/Resources/Locale/en-US/weapons/ranged/gun.ftl index 87703558aa..58dce848a1 100644 --- a/Resources/Locale/en-US/weapons/ranged/gun.ftl +++ b/Resources/Locale/en-US/weapons/ranged/gun.ftl @@ -23,6 +23,6 @@ gun-magazine-examine = It has [color={$color}]{$count}[/color] shots remaining. # RevolverAmmoProvider gun-revolver-empty = Empty revolver gun-revolver-full = Revolver full -gun-revolver-insert = Insert +gun-revolver-insert = Inserted gun-revolver-spin = Spin revolver gun-revolver-spun = Spun