From caa424f424e466c992d64d3d7f6eefbadc64b2cd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 16:08:04 +0200 Subject: [PATCH] BrownoutTests: a throttle under the old .01 gate still asks for its power Hand mutant powerrequest-gate-01 survived: the gate's only reach is the energy asked. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/BrownoutTests.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Aetheria.Shared.Tests/BrownoutTests.cs b/tests/Aetheria.Shared.Tests/BrownoutTests.cs index 432b42d51..c34c6c22b 100644 --- a/tests/Aetheria.Shared.Tests/BrownoutTests.cs +++ b/tests/Aetheria.Shared.Tests/BrownoutTests.cs @@ -138,6 +138,20 @@ public sealed class BrownoutTests : IDisposable return (-ship.Velocity.y, ship.GetBehavior()); } + // A throttle the old .01 gate cut off still asks for its share of the power (the allocator balances a drive pair + // with throttles of a thousandth). + [Fact] + public void ASmallThrottleStillAsksForItsPower() + { + using var cache = OpenCatalog(new ThrusterData + { + Thrust = Constant(100), Visibility = Constant(0), Heat = Constant(0), EnergyUsage = Constant(100) + }); + var thruster = BuildShip(cache, reactorCharge: 1000).GetBehavior(); + thruster.Axis = .005f; + Assert.Equal(.5f, thruster.PowerRequest(1f), 4); + } + [Fact] public void ThrusterAtHalfGrantProducesReducedNotZeroNotFullThrust() {