cleanup
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user