mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 06:55:59 +01:00
feat(blackbox): the train protection's buzzer told apart from its braking
The buzzer has a colour of its own on the timeline and in the cab, no longer the braking's red, and an event of its own: acknowledged after how long, or not acknowledged when the braking follows. The alerter's buzzer needs its lamp, since a protection with one acknowledgement tells the cab signalling's buzzer as the alerter's too. Braking with no lamp, the protection with no power, is not shown as the driver's on the timeline and in the cab either.
This commit is contained in:
@@ -519,13 +519,14 @@ public sealed class Recording
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>When the train protection braked the user's train: the alerter or the cab signalling not acknowledged.</summary>
|
||||
public IReadOnlyList<TimeSpanRange> SecurityBrakings() => CabSpans(s => s.ProtectionBraking);
|
||||
|
||||
/// <summary>
|
||||
/// When the train protection braked the user's train: the alerter or the cab signalling not acknowledged, its lamp
|
||||
/// blinking. Braking with neither is the protection with no power (TSecuritySystem::is_braking), a cab not yet
|
||||
/// started or a power cut: no driver's fault, not counted.
|
||||
/// When the train protection's buzzer sounded in the user's cab: a lamp not acknowledged in time, the braking to
|
||||
/// follow unless acknowledged on. Until it ends, braking included.
|
||||
/// </summary>
|
||||
public IReadOnlyList<TimeSpanRange> SecurityBrakings() =>
|
||||
CabSpans(s => s.Has(SecurityFlags.Braking) && (s.Has(SecurityFlags.Vigilance) || s.Has(SecurityFlags.CabSignal)));
|
||||
public IReadOnlyList<TimeSpanRange> SecurityAlarms() => CabSpans(s => s.VigilanceBuzzer || s.CabSignalBuzzer);
|
||||
|
||||
/// <summary>The commands the user gave in a vehicle, presses only.</summary>
|
||||
public IEnumerable<CommandEntry> UserCommands() => _commands.Where(c => c.Pressed && c.Vehicle != 0);
|
||||
|
||||
Reference in New Issue
Block a user