mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 23:17:56 +01:00
b35a6129bc
The orders of the AI driver (TOrders) were unscoped bits, summed (an order
carries Change_direction on top of Shunt), masked, and compared as numbers
(order < Obey_train, order >= Shunt).
- vehicle/driverorders.h: enum class DriverOrder (waitForOrders,
prepareEngine, releaseEngine, changeDirection, connect, disconnect, shunt,
looseShunt, obeyTrain, bank, jumpToFirstOrder) and DriverOrders, an
EnumSet of them. A small header, so brakesetting.h names the orders without
Driver.h.
- the comparisons of the numbers are the sets they meant: the orders from
shunt up are movingOrders, those from obeyTrain up trainOrders;
SingleOrder() gives the order to a switch, where a sum of several matches
no case, as it did
- the texts of the scenery commands (Shunt, Obey_train...) and of the
translations are unchanged; only the C++ names changed
No change in behaviour: 1144/1144 tests, golden traces exact against staging
62f7a29b.