From 8c5a904cb7d1da930489c04680c871ffa0295d2b Mon Sep 17 00:00:00 2001 From: Nibu Date: Thu, 5 Nov 2026 11:39:11 +0000 Subject: [PATCH] Tests that pin a thruster's authored push read it at ThrustScale 1 e0c1daa4e made thrust a tenth of authored by default (GameplaySettings.ThrustScale = .1), which broke twelve tests that pin what a thruster, a hull or a brain does (Brownout, ConditionRatio, Longinus top speed, the evasion, approach and envelope tests, SimRateEquivalence). Their fixtures now state ThrustScale 1: they pin mechanics, and a retune of the global knob does not move them. Co-Authored-By: Claude Sonnet 5.5 --- tests/Aetheria.Shared.Tests/BrownoutTests.cs | 3 ++- tests/Aetheria.Shared.Tests/ConditionRatioTests.cs | 3 ++- tests/Aetheria.Shared.Tests/RestoredHullsTests.cs | 10 +++++++++- tests/Aetheria.Shared.Tests/RunStartTests.cs | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/BrownoutTests.cs b/tests/Aetheria.Shared.Tests/BrownoutTests.cs index 95958170c..3ac400c56 100644 --- a/tests/Aetheria.Shared.Tests/BrownoutTests.cs +++ b/tests/Aetheria.Shared.Tests/BrownoutTests.cs @@ -53,7 +53,8 @@ public sealed class BrownoutTests : IDisposable { DefaultEntitySettings = new EntitySettings(), Tiers = new[] { new RarityTier { Name = "Common", Quality = .5f, Color = new float3(1, 1, 1) } }, - QualityPriceModifier = new ExponentialLerp() + QualityPriceModifier = new ExponentialLerp(), + ThrustScale = 1f // these pin a thruster's authored push, not the global flight tuning }; private static PerformanceStat Constant(float v) => new PerformanceStat { Min = v, Max = v }; diff --git a/tests/Aetheria.Shared.Tests/ConditionRatioTests.cs b/tests/Aetheria.Shared.Tests/ConditionRatioTests.cs index 00d446384..3e02965db 100644 --- a/tests/Aetheria.Shared.Tests/ConditionRatioTests.cs +++ b/tests/Aetheria.Shared.Tests/ConditionRatioTests.cs @@ -28,7 +28,8 @@ public sealed class ConditionRatioTests : IDisposable { DefaultEntitySettings = new EntitySettings(), Tiers = new[] { new RarityTier { Name = "Common", Quality = .5f, Color = new float3(1, 1, 1) } }, - QualityPriceModifier = new ExponentialLerp() + QualityPriceModifier = new ExponentialLerp(), + ThrustScale = 1f // these pin a thruster's authored push, not the global flight tuning }; private static PerformanceStat Constant(float v) => new PerformanceStat { Min = v, Max = v }; diff --git a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs index 6dd235551..121d468b3 100644 --- a/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs +++ b/tests/Aetheria.Shared.Tests/RestoredHullsTests.cs @@ -31,7 +31,15 @@ public sealed class RestoredHullsTests // (tools/AetherDb/AuthoredSettings.cs) is the same headless YAML reader tools/AetherDb already uses to // inspect Settings.asset outside Unity; this loads the real GameplaySettings the same way instead of // hand-copying its fields a second time. - internal static GameplaySettings Settings() => AuthoredSettings.Load(FindRepoRoot()).Read("GameplaySettings"); + internal static GameplaySettings Settings() => PinnedFlight(AuthoredSettings.Load(FindRepoRoot()).Read("GameplaySettings")); + + // The authored settings with the global thrust tuning at 1 (GameplaySettings.ThrustScale, 0.1 in play): tests that pin + // what a thruster, a hull or a brain does read the gear's own thrust, so a retune of the knob does not move them. + internal static GameplaySettings PinnedFlight(GameplaySettings settings) + { + settings.ThrustScale = 1f; + return settings; + } // Same composition FireControlCut7Tests.OpenReadOnlyRealCatalog uses: a registry scoped to the shipped // assembly's own [CultDocument] types, so this test's own process-wide type registration never pollutes the diff --git a/tests/Aetheria.Shared.Tests/RunStartTests.cs b/tests/Aetheria.Shared.Tests/RunStartTests.cs index 69b040d4e..efd17eb71 100644 --- a/tests/Aetheria.Shared.Tests/RunStartTests.cs +++ b/tests/Aetheria.Shared.Tests/RunStartTests.cs @@ -53,7 +53,7 @@ public sealed partial class RunStartTests : IDisposable _galaxy = new Galaxy(tutorial, authored.Read("TutorialBackgroundSettings"), _cache, new PlayerSettings(), Directory.CreateDirectory(Path.Combine(_root, "Narrative")), _ => { }, null, GalaxySeed); - _items = new ItemManager(1u, _cache, new ProvenanceLedger(), authored.Read("GameplaySettings"), _ => { }); + _items = new ItemManager(1u, _cache, new ProvenanceLedger(), RestoredHullsTests.PinnedFlight(authored.Read("GameplaySettings")), _ => { }); _protagonist = _galaxy.ResolveFaction(tutorial.ProtagonistFaction); // GameSettings.StartingHullName is a plain field of the Unity settings object, not a ServerShared subtree