From a7477e679dd8705a2796beba992726331e3ba74c Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 05:51:10 +0200 Subject: [PATCH] Command seam fixes: the ping pin runs before any switch is thrown; a stance set is pinned as a set beside the flips Co-Authored-By: Claude Opus 5.5 --- .../PilotSeamPlayerTests.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs b/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs index b132a6691..1302950c9 100644 --- a/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs +++ b/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs @@ -232,6 +232,9 @@ public sealed partial class RunStartTests Assert.False(east.IsHostileTo(west), "nothing lands before the step"); arena.Update(SeamDt); Assert.True(east.IsHostileTo(west)); + east.Command.Iff(west, true); + arena.Update(SeamDt); + Assert.True(east.IsHostileTo(west), "a stance set is a set, not a flip"); east.Command.ToggleStance(west); east.Command.ToggleStance(west); @@ -254,6 +257,17 @@ public sealed partial class RunStartTests var (arena, east, _) = SeamPair(false); Assert.Null(east.Shield); Assert.NotNull(east.Sensor); + var pings = 0; + east.Sensor.OnPingStart += () => pings++; + for (var step = 0; step < 600; step++) arena.Update(SeamDt); // the ping's capacitor fills, before any switch is thrown + Assert.Equal(0, pings); + east.Command.Ping(); + Assert.Equal(0, pings); + arena.Update(SeamDt); + Assert.Equal(1, pings); + for (var step = 0; step < 10; step++) arena.Update(SeamDt); + Assert.Equal(1, pings); + (bool, bool) Switches() => (east.OverrideShutdown, east.HeatsinksEnabled); Assert.Equal((false, true), Switches()); @@ -272,17 +286,6 @@ public sealed partial class RunStartTests east.Command.ToggleHeatsinks(); arena.Update(SeamDt); Assert.Equal((true, false), Switches()); - - var pings = 0; - east.Sensor.OnPingStart += () => pings++; - for (var step = 0; step < 600; step++) arena.Update(SeamDt); // the ping's capacitor fills - Assert.Equal(0, pings); - east.Command.Ping(); - Assert.Equal(0, pings); - arena.Update(SeamDt); - Assert.Equal(1, pings); - for (var step = 0; step < 10; step++) arena.Update(SeamDt); - Assert.Equal(1, pings); } // A trigger that counts its edges: a semi-auto fires once per Activate.