29 lines
1.3 KiB
C#
29 lines
1.3 KiB
C#
namespace ReactorMaintenance.Simulation;
|
|
|
|
public sealed record PropState
|
|
{
|
|
public EConsumerServiceState ServiceStateFor(ECarrierType carrier)
|
|
{
|
|
return carrier switch {
|
|
ECarrierType.Fuel => FuelServiceState,
|
|
ECarrierType.Water => WaterServiceState,
|
|
ECarrierType.Electricity => ElectricityServiceState,
|
|
_ => EConsumerServiceState.Unknown
|
|
};
|
|
}
|
|
|
|
public EPropType Type { get; init; }
|
|
public ECarrierType Carrier { get; init; }
|
|
public EPropSwitchState SwitchState { get; init; } = EPropSwitchState.Enabled;
|
|
public EConsumerServiceState ServiceState { get; init; } = EConsumerServiceState.Unknown;
|
|
public EConsumerServiceState FuelServiceState { get; init; } = EConsumerServiceState.Unknown;
|
|
public EConsumerServiceState WaterServiceState { get; init; } = EConsumerServiceState.Unknown;
|
|
public EConsumerServiceState ElectricityServiceState { get; init; } = EConsumerServiceState.Unknown;
|
|
public int JunctionMode { get; init; }
|
|
public ERemedyType RemedyType { get; init; }
|
|
public bool Depleted { get; init; }
|
|
public int ReactorId { get; init; }
|
|
public EDoorState DoorState { get; init; } = EDoorState.Closed;
|
|
|
|
public bool IsEnabled => SwitchState == EPropSwitchState.Enabled;
|
|
} |