Tests: the lock fixtures carry munition parts; the migration and item-read tests read the stat the way the engine does
LockWarningTests builds launcher designs, which the new gate (ValidateMunitionParts) refuses without parts. The golden test selects the role's Quality term among the stat's heat and durability terms, and the item-read test settles the ship at the item's optimal temperature so only role quality moves the stat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d24135a075
commit
a249f86cef
2 changed files with 28 additions and 13 deletions
|
|
@ -68,7 +68,7 @@ public sealed class LockWarningTests : IDisposable
|
|||
|
||||
private static PerformanceStat Const(float v) => new PerformanceStat { Min = v, Max = v };
|
||||
|
||||
private static GearData Launcher(string name, float lockSpeed, float sensorImpact, float lockAngle, float directionImpact) => new GearData
|
||||
private static GearData Launcher(string name, float lockSpeed, float sensorImpact, float lockAngle, float directionImpact) => WithMunitionParts(new GearData
|
||||
{
|
||||
Name = name, Hardpoint = HardpointType.Sensors, Shape = new Shape(), Durability = 1,
|
||||
MinimumTemperature = -1000, MaximumTemperature = 1000, OptimalTemperature = 0, PlateauWidth = 2000,
|
||||
|
|
@ -84,7 +84,14 @@ public sealed class LockWarningTests : IDisposable
|
|||
DirectionImpact = Const(directionImpact), Decay = Const(.1f)
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// A launcher design carries the five munition parts (StatValidation.ValidateMunitionParts); these fixtures are about the lock.
|
||||
private static GearData WithMunitionParts(GearData launcher)
|
||||
{
|
||||
launcher.Behaviors.AddRange(MunitionPartsTests.Parts(0));
|
||||
return launcher;
|
||||
}
|
||||
|
||||
private int _nextLot = 2;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue