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

Merge pull request #276 from MaSzyna-EU07/fix/et42-fans-compressor-lamps-et22-louvre

ET42: line contactors interlocked with the section fans, fan lamp of the own section; ET22: louvre lamp
This commit is contained in:
maj00r
2026-11-11 23:26:46 +01:00
committed by GitHub
7 changed files with 413 additions and 6 deletions

View File

@@ -326,6 +326,14 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
case driver_hint::converteron: {
if( AIControllFlag ) {
mvOccupied->ConverterSwitch( true );
// the local switch of the converter too, where the line contactors wait for the vehicle's own converter
// (LineContactorsInterlock): left off by the human driver, that vehicle would never take power
pVehicle->for_each(
coupling::control,
[]( TDynamicObject * Vehicle ) {
auto *vehicle { Vehicle->MoverParameters };
if( vehicle->LineContactorsHeldByLocalConverterSwitch() ) {
vehicle->ConverterAllowLocal = true; } } );
}
remove_hint( driver_hint::converteroff );
hint(