Centralize simulation balancing values
This commit is contained in:
@@ -9,9 +9,9 @@ public sealed class SimulationEngineTests
|
||||
.SetCell(new(2, 2), new() {
|
||||
Kind = ECellKind.Generator,
|
||||
Pipe = EPipeMedium.Fuel,
|
||||
LeakRate = 4,
|
||||
Pressure = 8,
|
||||
Integrity = 8,
|
||||
LeakRate = Balancing.FuelVaporFireThreshold,
|
||||
Pressure = Balancing.PressurizedFuelLeakPressureThreshold + Balancing.NeighborDistance,
|
||||
Integrity = Balancing.DefaultEditedPipeIntegrity,
|
||||
Powered = true
|
||||
});
|
||||
|
||||
@@ -26,13 +26,13 @@ public sealed class SimulationEngineTests
|
||||
var level = LevelState.Create("Wet cable", 6, 6)
|
||||
.SetCell(new(3, 3), new() {
|
||||
Pipe = EPipeMedium.Coolant,
|
||||
LeakRate = 3,
|
||||
LeakRate = Balancing.ElectrifiedCoolantPoolingThreshold,
|
||||
Powered = true
|
||||
});
|
||||
|
||||
var next = m_Engine.AdvanceTurn(level);
|
||||
|
||||
Assert.True(next.GetCell(new(3, 3)).Hazards.ElectricalCharge >= 2);
|
||||
Assert.True(next.GetCell(new(3, 3)).Hazards.ElectricalCharge >= Balancing.ElectricalChargeIncrease);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -42,7 +42,7 @@ public sealed class SimulationEngineTests
|
||||
.SetCell(new(2, 2), new() {
|
||||
Hazards = new() {
|
||||
Fire = true,
|
||||
Smoke = 6
|
||||
Smoke = Balancing.SmokeSpreadThreshold
|
||||
}
|
||||
});
|
||||
|
||||
@@ -99,8 +99,8 @@ public sealed class SimulationEngineTests
|
||||
|
||||
var forecasts = engine.Forecast(level);
|
||||
|
||||
Assert.Equal(12, forecasts.Count);
|
||||
Assert.Equal(12, forecasts.Max(forecast => forecast.Turns));
|
||||
Assert.Equal(Balancing.MaxForecastStepCount, forecasts.Count);
|
||||
Assert.Equal(Balancing.MaxForecastStepCount, forecasts.Max(forecast => forecast.Turns));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -109,7 +109,7 @@ public sealed class SimulationEngineTests
|
||||
var level = LevelState.Create("Meltdown", 6, 6)
|
||||
.SetCell(new(2, 2), new() {
|
||||
Kind = ECellKind.Reactor,
|
||||
Hazards = new() { Heat = 9 }
|
||||
Hazards = new() { Heat = Balancing.MeltdownCoreHeatThreshold - Balancing.ReactorHeatIncrease }
|
||||
});
|
||||
|
||||
var forecasts = m_Engine.Forecast(level);
|
||||
@@ -122,7 +122,7 @@ public sealed class SimulationEngineTests
|
||||
{
|
||||
var level = LevelState.Create("Lost", 6, 6) with {
|
||||
Global = new() {
|
||||
CoreHeat = 10,
|
||||
CoreHeat = Balancing.MeltdownCoreHeatThreshold,
|
||||
Lost = true,
|
||||
Status = "CORE MELTDOWN"
|
||||
}
|
||||
@@ -139,9 +139,9 @@ public sealed class SimulationEngineTests
|
||||
var level = LevelState.Create("Collapse", 6, 6)
|
||||
.SetCell(new(2, 2), new() {
|
||||
Kind = ECellKind.Generator,
|
||||
Hazards = new() { Stability = 3 }
|
||||
Hazards = new() { Stability = Balancing.CriticalCellStabilityThreshold }
|
||||
}) with {
|
||||
Global = new() { FacilityStability = 1 }
|
||||
Global = new() { FacilityStability = Balancing.FireStabilityDamage }
|
||||
};
|
||||
|
||||
var forecasts = m_Engine.Forecast(level);
|
||||
|
||||
Reference in New Issue
Block a user