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

4 Commits

Author SHA1 Message Date
jerrrrycho
64d1b7f847 fix: the inspector takes a train below 1 km/h for standing and a bank run for a train (review of #282)
The AI inspects the train while it still creeps to a stop (W4, Shunt to Obey_train) and as it couples, so the 0.05 km/h threshold missed the §19.9 cut-out; it now uses EU07_AI_MOVEMENT. Bank counts as a train, as in the braking tables.
2026-11-08 21:38:16 +01:00
jerrrrycho
7db67c3ce7 fix: the inspector cuts brakes out only in a train at a standstill, R+Mg keeps the rapid stage (review of #282)
- §19.9 cut-outs only when the AI runs the consist as a train (Obey_train); in shunting a wagon without G brakes on P,
  which also puts back a brake the inspector cut out before
- no new cut-out while the consist moves: left to the next inspection at a standstill (putting back still happens)
- ESt4R, LSt and EStED test the bit of R, so R+Mg keeps the high-speed stage of R as on the KE and Oerlikon valves
2026-11-08 18:03:13 +01:00
jerrrrycho
81f10e4d90 fix: AI wagon inspector cuts out the brake of wagons without G in a train on G (eu07/maszyna#350)
Cw-1 §19.9: in a freight train braked on G, the brake of a vehicle that has
no G setting (e.g. a passenger car with P and R) is cut out. The inspector
put such wagons on P; now it cuts their brake out the way the scenery's '0'
flag does (b_dmg, the distributor's reservoirs emptied), so the brake
releases and stays off.

- The vehicle remembers the inspector cut it out
  (TMoverParameters::BrakeCutOutByInspector); the next inspection puts such
  a brake back and sets it to what the new train needs. A brake cut out for
  any other reason (scenery, player, damage) is never put back; the cab's
  cut-out toggle hands an inspector's cut-out over to the player.
- Locomotives and the vehicle the train is driven from keep a working
  brake (on P). In the long locomotive setting (§19.3b) the train runs on
  P, so a wagon without G stays on P there.
- The braking tables after the settings leave cut-out brakes out.
- §18.3: a car with R whose brake is cut out counts as one on P.
- ai.brakesetting.cw1 no keeps the earlier behaviour: nothing cut out.

The choice and the cutting out stay in vehicle/brakesetting.{h,cpp}, with
unit tests on real wagons.
2026-11-08 13:03:06 +01:00
jerrrrycho
636d29eb22 fix: AI wagon inspector sets G/P/R by the instruction Cw-1 (eu07/maszyna#350)
The brake settings the AI chooses for a train (TController::AutoRewident) now
follow Cw-1 (Mw56) §18 and §19:

- freight trains: the 500 m / 1300 t and 300 m / 600 t limits apply to the
  wagons without the locomotives, limits included;
- long locomotive setting: the five wagons on G are counted from the head of
  the train, not again after every locomotive in it;
- a vehicle without the setting the train needs gets the other of G and P;
- passenger trains run on R only with at most three cars on P, fewer than
  those on R; cars with a magnetic rail brake run on R+Mg.

The choice moves to vehicle/brakesetting.{h,cpp} in eu07_core, with unit
tests. The old inspector stays behind the new eu07.ini key
ai.brakesetting.cw1 (default yes; no restores the earlier behaviour).

No game data changes needed.

(eu07/maszyna#350)
2026-11-07 21:53:25 +01:00