18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 09:15:01 +01:00

feat: line breaker before the pantographs, Cntrl.PantRequiresMain (#68)

New optional .fiz key Cntrl.PantRequiresMain (default No, every existing
vehicle unchanged). With Yes, as on Czech-built locomotives:
- the line breaker closes on the low voltage circuits, without traction
  voltage, and the undervoltage trip doesn't open it (overvoltage and the
  other trips still do);
- a pantograph valve opens and stays open only while the vehicle's line
  breaker is closed, so opening it drops the pantographs.

The AI (TController::PrepareEngine) closes the line breaker before raising
the pantographs for such a vehicle; the line breaker steps moved into
TController::close_line_breaker(). test::start_up() follows the same order.

Game data: to use it, PantRequiresMain=Yes goes on the Cntrl. line of
dynamic/pkp/ep05_v2/ep05.fiz, ep05v1.fiz and dynamic/cd/181_v2/181_cz1.fiz,
18x_pl.fiz (left for later, not part of this change). (#68)
This commit is contained in:
jerrrrycho
2026-11-07 19:18:37 +01:00
parent 939e42b611
commit 5a20f86fd0
6 changed files with 164 additions and 15 deletions

View File

@@ -169,6 +169,13 @@ bool start_up(driven Driven, track const &Track, double Seconds, trace *Trace) {
if (diesel) {
prepare_diesel(Driven);
}
if (controlling.PantographsRequireMains && false == controlling.Mains) {
// the pantographs rise only through the closed line breaker, which closes without their voltage
for (int i = 0; i < 3 && cab.DirActive <= 0; ++i) {
cab.DirectionForward();
}
close_line_breaker(Driven);
}
if (collector) {
raise_pantographs(Driven);
}