From 7e92c7da93c04844b274ed3c9a30599ee799f4a9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 16 Oct 2026 19:08:59 +0200 Subject: [PATCH] ConsumableAiTests: refit the gun the way a docked ship does Not yet verified. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/ConsumableAiTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs b/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs index 9c972a26e..adc8903bb 100644 --- a/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs +++ b/tests/Aetheria.Shared.Tests/ConsumableAiTests.cs @@ -332,8 +332,12 @@ public sealed class ConsumableAiTests : IDisposable Assert.Equal(1, s.Carried); var longGun = (EquippableItem) s.Items.CreateInstance(s.Items.CreateLot(s.LongGun, s.Maker, .5f)); + Assert.True(s.Zone.Remove(s.Agent)); // refitting is a docked ship's act: out of the zone and inactive + s.Agent.Deactivate(); Assert.NotNull(s.Agent.TryUnequip(s.Agent.Equipment.Single(e => e.Behaviors.OfType().Any()))); Assert.True(s.Agent.TryEquip(longGun, HardpointCell)); + s.Zone.Admit(s.Agent, piloted: false); // back in, the agent's Minion keeps its CombatState + s.Place(30f, 0f); s.Zone.Update(.05f); s.Zone.Update(.05f); var refit = (float) typeof(CombatState).GetField("_optimumRange", Private).GetValue(s.State);