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

fix: no multiple-unit control between electric and diesel locomotives

An electric and a diesel locomotive got their control coupled whenever the
scenario (and so the Starter) asked for it, since the scenery coupling ignores
ControlType, or when neither coupler named a control system, so a Vectron and
an SM42 ran in multiple unit.

TMoverParameters::Attach() now leaves the control connection out between an
electric (ElectricSeriesMotor, ElectricInductionMotor) and a diesel
(DieselEngine, DieselElectric/DumbDE) traction vehicle, for the scenery, the
AI, the coupling keys and the automatic couplers alike, and logs it. Vehicles
without own traction (cars, control trailers) are not affected, nor are
permanent couplings within a unit, nor couplers that both name the same
ControlType, which stays the vehicle authors' way to allow such a pair. The
AI coupling order expects the coupling the vehicles can take, so it doesn't
wait for the control connection forever.

Existing scenarios coupling such a pair still load, without the control
connection. "controlcoupling.enginecheck no" in eu07.ini turns the check off.
No SVN data change is needed. (eu07/maszyna#520)
This commit is contained in:
jerrrrycho
2026-11-07 21:16:19 +01:00
parent 939e42b611
commit 6dc1239553
7 changed files with 230 additions and 5 deletions

View File

@@ -751,6 +751,12 @@ bool global_settings::ConfigParseSimulation(cParser& Parser, const std::string&
return true;
}
if (token == "controlcoupling.enginecheck")
{
ParseOne(Parser, control_coupling_engine_check, 1);
return true;
}
return false;
}
@@ -1590,6 +1596,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "scenario.time.current", ScenarioTimeCurrent );
export_as_text( Output, "scenario.weather.temperature", AirTemperature );
export_as_text( Output, "ai.trainman", AITrainman );
export_as_text( Output, "controlcoupling.enginecheck", control_coupling_engine_check );
export_as_text( Output, "scalespeculars", ScaleSpecularValues );
export_as_text( Output, "gfxrenderer", GfxRenderer );
export_as_text( Output, "shadows", RenderShadows );