mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-28 19:44:07 +01:00
CheckVehicles() ran the inspector (AutoRewident(), which also releases the hand and spring brakes of the AI's train) only under Shunt, Loose_shunt, Obey_train and Bank. A locomotive loaded cold (trainset velocity 0) starts with its hand brake on; when the first order it drives under is Connect (Shunt x,y with a coupler, e.g. Shunt -2 -3 after Prepare_engine), it pulled against the hand brake for good and never reached the wagons. The inspector now also runs under Connect, except for the look the AI takes at the moment it couples (CheckVehicles(Connect)): the wagons just coupled keep their hand brakes until the order after the coupling looks at the new train, as before, so those to be left standing again (Shunt x,-y) stay braked. Wagons not yet coupled are never touched: AutoRewident() goes over the vehicles coupled to the AI's train only. The rule is brake_setting::inspects_train(), with a unit test.
27 KiB
27 KiB