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 <noreply@anthropic.com>
This commit is contained in:
parent
a892b5463b
commit
8c5a904cb7
4 changed files with 14 additions and 4 deletions
|
|
@ -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 };
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
|
|
|
|||
|
|
@ -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>("GameplaySettings");
|
||||
internal static GameplaySettings Settings() => PinnedFlight(AuthoredSettings.Load(FindRepoRoot()).Read<GameplaySettings>("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
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public sealed partial class RunStartTests : IDisposable
|
|||
_galaxy = new Galaxy(tutorial, authored.Read<SectorBackgroundSettings>("TutorialBackgroundSettings"),
|
||||
_cache, new PlayerSettings(),
|
||||
Directory.CreateDirectory(Path.Combine(_root, "Narrative")), _ => { }, null, GalaxySeed);
|
||||
_items = new ItemManager(1u, _cache, new ProvenanceLedger(), authored.Read<GameplaySettings>("GameplaySettings"), _ => { });
|
||||
_items = new ItemManager(1u, _cache, new ProvenanceLedger(), RestoredHullsTests.PinnedFlight(authored.Read<GameplaySettings>("GameplaySettings")), _ => { });
|
||||
_protagonist = _galaxy.ResolveFaction(tutorial.ProtagonistFaction);
|
||||
|
||||
// GameSettings.StartingHullName is a plain field of the Unity settings object, not a ServerShared subtree
|
||||
|
|
|
|||
Loading…
Reference in a new issue