Centralize simulation balancing values

This commit is contained in:
2026-05-08 21:38:03 +02:00
parent 8ec3c7847c
commit 8018ebbabb
13 changed files with 178 additions and 106 deletions

View File

@@ -58,43 +58,43 @@ public static class LevelEditor
},
EEditorTool.CoolantPipe => cell with {
Pipe = EPipeMedium.Coolant,
Flow = 4,
Pressure = 4,
Integrity = Math.Max(cell.Integrity, 8),
Flow = Balancing.DefaultPipeFlow,
Pressure = Balancing.DefaultPipePressure,
Integrity = Math.Max(cell.Integrity, Balancing.DefaultEditedPipeIntegrity),
PipeOpen = true
},
EEditorTool.FuelPipe => cell with {
Pipe = EPipeMedium.Fuel,
Flow = 4,
Pressure = 4,
Integrity = Math.Max(cell.Integrity, 8),
Flow = Balancing.DefaultPipeFlow,
Pressure = Balancing.DefaultPipePressure,
Integrity = Math.Max(cell.Integrity, Balancing.DefaultEditedPipeIntegrity),
PipeOpen = true
},
EEditorTool.PressurePipe => cell with {
Pipe = EPipeMedium.Pressure,
Flow = 5,
Pressure = 6,
Integrity = Math.Max(cell.Integrity, 8),
Flow = Balancing.DefaultPressurePipeFlow,
Pressure = Balancing.DefaultPressurePipePressure,
Integrity = Math.Max(cell.Integrity, Balancing.DefaultEditedPipeIntegrity),
PipeOpen = true
},
EEditorTool.Leak => cell with {
LeakRate = Math.Max(1, cell.LeakRate),
Integrity = Math.Min(cell.Integrity, 4)
LeakRate = Math.Max(Balancing.MinimumLeakRate, cell.LeakRate),
Integrity = Math.Min(cell.Integrity, Balancing.DamagedPipeIntegrity)
},
EEditorTool.Repair => cell with {
LeakRate = 0,
Integrity = 10,
LeakRate = Balancing.RepairedLeakRate,
Integrity = Balancing.DefaultCellIntegrity,
Hazards = cell.Hazards with {
Fire = false,
ElectricalCharge = 0
ElectricalCharge = Balancing.RepairedElectricalCharge
}
},
EEditorTool.Heat => cell with { Hazards = cell.Hazards with { Heat = Rules.Clamp(cell.Hazards.Heat + 2) } },
EEditorTool.Heat => cell with { Hazards = cell.Hazards with { Heat = Rules.Clamp(cell.Hazards.Heat + Balancing.HeatToolIncrease) } },
EEditorTool.Fire => cell with {
Hazards = cell.Hazards with {
Fire = !cell.Hazards.Fire,
Heat = Math.Max(cell.Hazards.Heat, 7),
Smoke = Math.Max(cell.Hazards.Smoke, 3)
Heat = Math.Max(cell.Hazards.Heat, Balancing.FireToolMinimumHeat),
Smoke = Math.Max(cell.Hazards.Smoke, Balancing.FireToolMinimumSmoke)
}
},
_ => cell