cleanup
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# Linux-specific instructions
|
||||
|
||||
- After every iteration, run `dotnet jb cleanupcode --build=False '$file1' '$file2' ...` for every C# file you touched.
|
||||
- After every iteration, run `dotnet jb cleanupcode --verbosity:ERROR ./ReactorMaintenance.slnx`.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Windows-specific instructions
|
||||
|
||||
- After the implementation is finished, run `python D:\Code\crlf.py $file1 $file2 ...` for changed files you recognize, in order to normalize all line endings of all touched files to CRLF.
|
||||
- After every iteration, run `jb cleanupcode '$file1' '$file2' ...` for every C# file you touched.
|
||||
- After every iteration, run `jb cleanupcode --verbosity:ERROR ReactorMaintenance.slnx`.
|
||||
@@ -2,6 +2,16 @@
|
||||
|
||||
public sealed record PropState
|
||||
{
|
||||
public EConsumerServiceState ServiceStateFor(ECarrierType carrier)
|
||||
{
|
||||
return carrier switch {
|
||||
ECarrierType.Fuel => FuelServiceState,
|
||||
ECarrierType.Coolant => CoolantServiceState,
|
||||
ECarrierType.Electricity => ElectricityServiceState,
|
||||
_ => EConsumerServiceState.Unknown
|
||||
};
|
||||
}
|
||||
|
||||
public EPropType Type { get; init; }
|
||||
public ECarrierType Carrier { get; init; }
|
||||
public EPropSwitchState SwitchState { get; init; } = EPropSwitchState.Enabled;
|
||||
@@ -16,14 +26,4 @@ public sealed record PropState
|
||||
public EDoorState DoorState { get; init; } = EDoorState.Closed;
|
||||
|
||||
public bool IsEnabled => SwitchState == EPropSwitchState.Enabled;
|
||||
|
||||
public EConsumerServiceState ServiceStateFor(ECarrierType carrier)
|
||||
{
|
||||
return carrier switch {
|
||||
ECarrierType.Fuel => FuelServiceState,
|
||||
ECarrierType.Coolant => CoolantServiceState,
|
||||
ECarrierType.Electricity => ElectricityServiceState,
|
||||
_ => EConsumerServiceState.Unknown
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,9 @@ using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Windows.Foundation;
|
||||
using Windows.System;
|
||||
using Windows.Storage;
|
||||
using Windows.Storage.Pickers;
|
||||
using Windows.System;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Popups;
|
||||
using WinRT.Interop;
|
||||
@@ -47,10 +47,13 @@ public sealed partial class MainWindow
|
||||
|
||||
private sealed class EditorToolViewModel(EditorToolCommand command, string label) : INotifyPropertyChanged
|
||||
{
|
||||
private bool m_IsSelected;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
private void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new(propertyName));
|
||||
}
|
||||
|
||||
public EditorToolCommand Command { get; } = command;
|
||||
public string Label { get; } = label;
|
||||
|
||||
@@ -67,10 +70,7 @@ public sealed partial class MainWindow
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new(propertyName));
|
||||
}
|
||||
private bool m_IsSelected;
|
||||
}
|
||||
|
||||
public MainWindow()
|
||||
@@ -1017,11 +1017,12 @@ public sealed partial class MainWindow
|
||||
private readonly IReadOnlyList<EditorToolViewModel> m_EditorTools = [];
|
||||
|
||||
private readonly SimulationEngine m_Simulation = new();
|
||||
private EEditorLayer m_ActiveLayer = EEditorLayer.Surface;
|
||||
private StorageFile? m_CurrentFile;
|
||||
private GridPosition? m_CursorDragStartCell;
|
||||
private bool m_DragExceededClickThreshold;
|
||||
private CanvasBitmap? m_HeatSprite;
|
||||
private EEditorLayer m_ActiveLayer = EEditorLayer.Surface;
|
||||
private GridPosition? m_CursorDragStartCell;
|
||||
private bool m_IsPanning;
|
||||
private Point m_LastPanPoint;
|
||||
private CanvasBitmap? m_LeakSprite;
|
||||
private bool m_LeftPointerDown;
|
||||
@@ -1029,7 +1030,6 @@ public sealed partial class MainWindow
|
||||
private LevelState m_Level;
|
||||
private double m_PanX;
|
||||
private double m_PanY;
|
||||
private bool m_IsPanning;
|
||||
private CanvasBitmap? m_RobotSprite;
|
||||
private GridPosition? m_SelectedCell;
|
||||
private int? m_SelectedReactorId = 1;
|
||||
|
||||
Reference in New Issue
Block a user