Organize simulation systems and balancing profiles

This commit is contained in:
2026-05-08 21:45:43 +02:00
parent 8018ebbabb
commit c46b6664ed
25 changed files with 406 additions and 269 deletions

View File

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