mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-04 23:45:17 +01:00
fix(mover): AutoRelay=Optional keeps its meaning, the field shunting switch is FieldShuntSwitch=Yes
AutoRelay=Optional means again what it did for every diesel-electric: with the switch off, the driver shunts the field by hand with the second controller. The switch that leaves the field full when off, as on the SU45 and SP45, is opted into with a new Cntrl. key, FieldShuntSwitch=Yes, next to AutoRelay=Optional. A key rather than a new AutoRelay value: the parser reads an AutoRelay value it doesn't know as No, so an older exe would take the relays away from the SU45, while it skips an unknown key. The value stays Optional, which every check of the switch looks for. The AI switches it on only in a vehicle with the key; one with AutoRelay=Optional alone is left as before. The SVN data then needs "AutoRelay=Optional FieldShuntSwitch=Yes" on line 9 of su45_v2/301d.fiz, sp45_v1/301db.fiz and sp45_v1/301db-152.fiz, after this is released; without it nothing changes.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "doctest.h"
|
||||
|
||||
#include "McZapkie/hamulce.h"
|
||||
#include "vehicle/fieldshunting.h"
|
||||
|
||||
namespace test {
|
||||
|
||||
@@ -138,7 +139,7 @@ void close_line_breaker(driven const &Driven) {
|
||||
}
|
||||
|
||||
// the converter, the compressor and the motor blowers, once the line breaker is closed; and the switch of the
|
||||
// field shunting of a diesel-electric that has one (AutoRelay=Optional)
|
||||
// field shunting of a diesel-electric that has one (AutoRelay=Optional with FieldShuntSwitch=Yes), as the AI does
|
||||
void switch_auxiliaries_on(TMoverParameters &Cab) {
|
||||
Cab.ConverterSwitch(true);
|
||||
Cab.CompressorSwitch(true);
|
||||
@@ -148,7 +149,7 @@ void switch_auxiliaries_on(TMoverParameters &Cab) {
|
||||
Cab.MotorBlowersSwitch(true, side);
|
||||
}
|
||||
}
|
||||
if (Cab.EngineType == TEngineType::DieselElectric && Cab.AutoRelayType == 2) {
|
||||
if (Cab.EngineType == TEngineType::DieselElectric && fieldshunting::has_switch(Cab.AutoRelayType, Cab.FieldShuntSwitch)) {
|
||||
Cab.AutoRelaySwitch(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user