Rename coolant to water

This commit is contained in:
2026-05-14 10:00:08 +02:00
parent 4ac8a77e8e
commit c149fe02a3
36 changed files with 157 additions and 157 deletions

View File

@@ -27,7 +27,7 @@ public sealed partial class MainWindow
Surface,
Electricity,
Fuel,
Coolant
Water
}
private sealed record CanvasLayout(double CellSize, double OriginX, double OriginY)
@@ -624,7 +624,7 @@ public sealed partial class MainWindow
private IEnumerable<ECarrierType> OrderedUndergroundLayers()
{
var carriers = new[] { ECarrierType.Fuel, ECarrierType.Coolant, ECarrierType.Electricity };
var carriers = new[] { ECarrierType.Fuel, ECarrierType.Water, ECarrierType.Electricity };
var activeCarrier = LayerCarrier(m_ActiveLayer);
return activeCarrier is null ? carriers : carriers.Where(carrier => carrier != activeCarrier).Append(activeCarrier.Value);
}
@@ -679,7 +679,7 @@ public sealed partial class MainWindow
var surface = m_Level.GetSurface(position);
var rect = layout.CellRect(position);
FillHazard(drawing, rect, surface.Fuel, c_FuelColor, 0.08, opacity, Balancing.Current.FuelCaution, Balancing.Current.FuelCritical);
FillHazard(drawing, rect, surface.Coolant, c_CoolantColor, 0.18, opacity, Balancing.Current.CoolantCaution, Balancing.Current.CoolantCritical);
FillHazard(drawing, rect, surface.Water, c_WaterColor, 0.18, opacity, Balancing.Current.WaterCaution, Balancing.Current.WaterCritical);
FillHazard(drawing, rect, surface.Electricity, c_ElectricityColor, 0.28, opacity, Balancing.Current.ElectricityCaution, Balancing.Current.ElectricityCritical);
var heatOpacity = SurfaceOverlayOpacity(surface.Heat, Balancing.Current.HeatCaution, Balancing.Current.HeatCritical);
@@ -884,13 +884,13 @@ public sealed partial class MainWindow
: $"{m_Level.Global.LevelState}: {m_EditorFeedback}";
InventoryGrid.ItemsSource = new[] {
new InspectorItemViewModel("Fuel", $"{m_Level.Robot.FuelNeutralizers}"),
new InspectorItemViewModel("Coolant", $"{m_Level.Robot.CoolantNeutralizers}"),
new InspectorItemViewModel("Water", $"{m_Level.Robot.WaterNeutralizers}"),
new InspectorItemViewModel("Electricity", $"{m_Level.Robot.ElectricityNeutralizers}"),
new InspectorItemViewModel("Heat", $"{m_Level.Robot.HeatShields} ({m_Level.Robot.HeatImmunitySteps.ToString(CultureInfo.InvariantCulture)} steps)")
};
RequiredGrid.ItemsSource = new[] {
new InspectorItemViewModel("Fuel", m_Level.RequiredFuelConsumers.ToString(CultureInfo.InvariantCulture)),
new InspectorItemViewModel("Coolant", m_Level.RequiredCoolantConsumers.ToString(CultureInfo.InvariantCulture)),
new InspectorItemViewModel("Water", m_Level.RequiredWaterConsumers.ToString(CultureInfo.InvariantCulture)),
new InspectorItemViewModel("Electric", m_Level.RequiredElectricityConsumers.ToString(CultureInfo.InvariantCulture))
};
@@ -902,13 +902,13 @@ public sealed partial class MainWindow
PropText.Text = prop.Type != EPropType.None ? $"{prop.Type} {prop.SwitchState}" : "(none)";
ServicesGrid.ItemsSource = new[] {
new InspectorItemViewModel("Fuel", prop.FuelServiceState.ToString()),
new InspectorItemViewModel("Coolant", prop.CoolantServiceState.ToString()),
new InspectorItemViewModel("Water", prop.WaterServiceState.ToString()),
new InspectorItemViewModel("Electricity", prop.ElectricityServiceState.ToString())
};
var surface = m_Level.GetSurface(position);
ConsumersGrid.ItemsSource = new[] {
new InspectorItemViewModel("Fuel", surface.FuelBlockTurns.ToString()),
new InspectorItemViewModel("Coolant", surface.CoolantBlockTurns.ToString()),
new InspectorItemViewModel("Water", surface.WaterBlockTurns.ToString()),
new InspectorItemViewModel("Electricity", surface.ElectricityBlockTurns.ToString())
};
LeaksGrid.ItemsSource = m_Level.Leaks.Select(leak => new InspectorItemViewModel(leak.Carrier.ToString(), $"{leak.UndergroundPosition.X}, {leak.UndergroundPosition.Y}"));
@@ -959,7 +959,7 @@ public sealed partial class MainWindow
var surface = m_Level.GetSurface(position);
return [
new("Fuel", Format(surface.Fuel)),
new("Coolant", Format(surface.Coolant)),
new("Water", Format(surface.Water)),
new("Electric", Format(surface.Electricity)),
new("Heat", Format(surface.Heat))
];
@@ -969,7 +969,7 @@ public sealed partial class MainWindow
{
return [
NetworkInspectionItem("Fuel", m_Level.GetUnderground(position, ECarrierType.Fuel)),
NetworkInspectionItem("Coolant", m_Level.GetUnderground(position, ECarrierType.Coolant)),
NetworkInspectionItem("Water", m_Level.GetUnderground(position, ECarrierType.Water)),
NetworkInspectionItem("Electric", m_Level.GetUnderground(position, ECarrierType.Electricity))
];
}
@@ -993,7 +993,7 @@ public sealed partial class MainWindow
return $"{leak.Carrier} Leak";
var surface = m_Level.GetSurface(position);
if (surface.Fuel > 0 || surface.Coolant > 0 || surface.Electricity > 0)
if (surface.Fuel > 0 || surface.Water > 0 || surface.Electricity > 0)
return "Surface Hazard";
if (surface.Heat > 0)
@@ -1011,10 +1011,10 @@ public sealed partial class MainWindow
{
var level = LevelState.Create("Cooling Sector B", 16, 12);
level = AddNetwork(level, ECarrierType.Fuel, new(2, 3), new(5, 3));
level = AddNetwork(level, ECarrierType.Coolant, new(2, 5), new(5, 5));
level = AddNetwork(level, ECarrierType.Water, new(2, 5), new(5, 5));
level = AddNetwork(level, ECarrierType.Electricity, new(2, 7), new(5, 7));
level = level.SetProp(new(2, 3), new() { Type = EPropType.Flow, Carrier = ECarrierType.Fuel });
level = level.SetProp(new(2, 5), new() { Type = EPropType.Flow, Carrier = ECarrierType.Coolant });
level = level.SetProp(new(2, 5), new() { Type = EPropType.Flow, Carrier = ECarrierType.Water });
level = level.SetProp(new(2, 7), new() { Type = EPropType.Flow, Carrier = ECarrierType.Electricity });
level = level.SetProp(new(5, 3), new() { Type = EPropType.Consumer });
level = level.SetProp(new(5, 5), new() { Type = EPropType.Consumer });
@@ -1022,8 +1022,8 @@ public sealed partial class MainWindow
level = level.SetProp(new(10, 5), new() { Type = EPropType.ReactorControl, ReactorId = 1 });
level = level.SetProp(new(11, 4), new() { Type = EPropType.AllSeeingEyeTerminal });
level = level.SetProp(new(11, 6), new() { Type = EPropType.RemedySupply, RemedyType = ERemedyType.HeatShield });
level = level.SetUnderground(new(4, 5), ECarrierType.Coolant, new() { State = EUndergroundState.Leaking }) with {
Leaks = [new() { Carrier = ECarrierType.Coolant, UndergroundPosition = new(4, 5), AccessPosition = new(4, 5) }],
level = level.SetUnderground(new(4, 5), ECarrierType.Water, new() { State = EUndergroundState.Leaking }) with {
Leaks = [new() { Carrier = ECarrierType.Water, UndergroundPosition = new(4, 5), AccessPosition = new(4, 5) }],
Robot = new() { Position = new(10, 5) },
Reactors = [
new() {
@@ -1134,7 +1134,7 @@ public sealed partial class MainWindow
return layer switch {
EEditorLayer.Electricity => ECarrierType.Electricity,
EEditorLayer.Fuel => ECarrierType.Fuel,
EEditorLayer.Coolant => ECarrierType.Coolant,
EEditorLayer.Water => ECarrierType.Water,
_ => null
};
}
@@ -1217,7 +1217,7 @@ public sealed partial class MainWindow
{
return carrier switch {
ECarrierType.Fuel => c_FuelColor,
ECarrierType.Coolant => c_CoolantColor,
ECarrierType.Water => c_WaterColor,
ECarrierType.Electricity => c_ElectricityColor,
_ => Colors.White
};
@@ -1256,7 +1256,7 @@ public sealed partial class MainWindow
{
return carrier switch {
ECarrierType.Fuel => "F",
ECarrierType.Coolant => "C",
ECarrierType.Water => "C",
ECarrierType.Electricity => "E",
_ => "?"
};
@@ -1266,7 +1266,7 @@ public sealed partial class MainWindow
{
return remedy switch {
ERemedyType.FuelNeutralizer => "F REM",
ERemedyType.CoolantNeutralizer => "C REM",
ERemedyType.WaterNeutralizer => "C REM",
ERemedyType.ElectricityNeutralizer => "E REM",
ERemedyType.HeatShield => "H SHD",
_ => "REM"
@@ -1295,25 +1295,25 @@ public sealed partial class MainWindow
Tool(EEditorTool.Floor, "Floor"),
Tool(EEditorTool.Wall, "Wall"),
CarrierTool(EEditorTool.Underground, ECarrierType.Fuel, "Fuel Net"),
CarrierTool(EEditorTool.Underground, ECarrierType.Coolant, "Coolant Net"),
CarrierTool(EEditorTool.Underground, ECarrierType.Water, "Water Net"),
CarrierTool(EEditorTool.Underground, ECarrierType.Electricity, "Electric Net"),
CarrierTool(EEditorTool.Flow, ECarrierType.Fuel, "Fuel Source"),
CarrierTool(EEditorTool.Flow, ECarrierType.Coolant, "Coolant Source"),
CarrierTool(EEditorTool.Flow, ECarrierType.Water, "Water Source"),
CarrierTool(EEditorTool.Flow, ECarrierType.Electricity, "Electric Source"),
Tool(EEditorTool.Consumer, "Consumer"),
Tool(EEditorTool.Junction, "Junction"),
Tool(EEditorTool.Door, "Door"),
Tool(EEditorTool.AllSeeingEyeTerminal, "Eye Terminal"),
RemedyTool(ERemedyType.FuelNeutralizer, "Fuel Remedy"),
RemedyTool(ERemedyType.CoolantNeutralizer, "Coolant Remedy"),
RemedyTool(ERemedyType.WaterNeutralizer, "Water Remedy"),
RemedyTool(ERemedyType.ElectricityNeutralizer, "Electric Remedy"),
RemedyTool(ERemedyType.HeatShield, "Heat Shield"),
Tool(EEditorTool.ReactorControl, "Reactor"),
CarrierTool(EEditorTool.Leak, ECarrierType.Fuel, "Fuel Leak"),
CarrierTool(EEditorTool.Leak, ECarrierType.Coolant, "Coolant Leak"),
CarrierTool(EEditorTool.Leak, ECarrierType.Water, "Water Leak"),
CarrierTool(EEditorTool.Leak, ECarrierType.Electricity, "Electric Leak"),
CarrierTool(EEditorTool.SurfaceHazard, ECarrierType.Fuel, "Fuel Hazard"),
CarrierTool(EEditorTool.SurfaceHazard, ECarrierType.Coolant, "Coolant Hazard"),
CarrierTool(EEditorTool.SurfaceHazard, ECarrierType.Water, "Water Hazard"),
CarrierTool(EEditorTool.SurfaceHazard, ECarrierType.Electricity, "Electric Hazard"),
Tool(EEditorTool.Heat, "Heat"),
Tool(EEditorTool.Robot, "Robot")
@@ -1363,7 +1363,7 @@ public sealed partial class MainWindow
private const int c_BottomRightCorner = 8;
private const int c_AllCorners = c_TopLeftCorner | c_TopRightCorner | c_BottomLeftCorner | c_BottomRightCorner;
private static readonly Color c_FuelColor = ColorHelper.FromArgb(255, 220, 65, 65);
private static readonly Color c_CoolantColor = ColorHelper.FromArgb(255, 57, 174, 196);
private static readonly Color c_WaterColor = ColorHelper.FromArgb(255, 57, 174, 196);
private static readonly Color c_ElectricityColor = ColorHelper.FromArgb(255, 236, 226, 82);
private readonly IReadOnlyList<EditorToolViewModel> m_EditorTools = [];
private readonly EditorImageRegistry m_Images = new();