From 87f29cb0c8d87803439d120e59168ebdbea70b76 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 06:18:32 +0200 Subject: [PATCH] Command seam fixes: the ping pin waits for the ping's cooldown and charge Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs b/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs index 1302950c9..9f8820338 100644 --- a/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs +++ b/tests/Aetheria.Shared.Tests/PilotSeamPlayerTests.cs @@ -259,12 +259,16 @@ public sealed partial class RunStartTests 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 + // The ping's cooldown runs out and its capacitor fills (over about as long again), before any switch is thrown. + var settle = 0; + for (; settle < 36000 && east.Sensor.Cooldown > 0; settle++) arena.Update(SeamDt); + Assert.True(east.Sensor.Cooldown <= 0, $"fixture: the ping cools down ({east.Sensor.Cooldown} after {settle} steps)"); + for (var step = 0; step < settle + 600; step++) arena.Update(SeamDt); Assert.Equal(0, pings); east.Command.Ping(); Assert.Equal(0, pings); arena.Update(SeamDt); - Assert.Equal(1, pings); + Assert.True(pings == 1, $"one ping at the step (cooldown {east.Sensor.Cooldown}, settled {settle} steps)"); for (var step = 0; step < 10; step++) arena.Update(SeamDt); Assert.Equal(1, pings);