From e9d59cff72a41bd708a76daef60f801467d31af2 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 12 Oct 2026 03:39:59 +0200 Subject: [PATCH] BeltConditions: let the ship settle for a second before reading what its sensors see A weapon's reach and a sensor's gain are zero until the ship's stats settle, so at the first instant no rock is in reach. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/BeltScenarioTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/BeltScenarioTests.cs b/tests/Aetheria.Shared.Tests/BeltScenarioTests.cs index b075505ab..0222ca035 100644 --- a/tests/Aetheria.Shared.Tests/BeltScenarioTests.cs +++ b/tests/Aetheria.Shared.Tests/BeltScenarioTests.cs @@ -13,7 +13,7 @@ public sealed partial class RunStartTests // Belt: the arena carries a belt of at least the scanned asteroid count, nothing else flies in it, the player stands // 100 m outside the ring on the side nearest the origin and faces along it, and the player's sensors see rocks within - // mining reach from the first tick. + // mining reach once the ship has settled. [Fact] public void BeltConditions() { @@ -34,6 +34,8 @@ public sealed partial class RunStartTests Assert.True(abs(dot(player.Direction, normalize(radial))) < .01f, "the player faces along the ring"); var field = arena.Planets.Single(body => body.Value == belt).Key; + // A weapon's reach and a sensor's gain are read once the ship's stats have settled, so the first second passes first. + for (var tick = 0; tick < 60; tick++) arena.Update(1f / 60f); var inReach = new List(); player.VisibleChunksInReach(inReach); Assert.NotEmpty(inReach);