18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 21:45:16 +01:00
Files
maszyna/vehicle
jerrrrycho 02c4c81694 refactor: the line breaker state as an enum class, fcfuH without the text round trip (L16) (#478)
* refactor(cab): the cab's state of the line breaker is an enum class

TTrain::m_linebreakerstate kept 0, 1 and 2 for open, closed and closing
(the closing control held long enough). It is linebreaker::state now, which
linebreaker::pressed() takes too; every comparison and assignment names the
state. Nothing writes the state out: it isn't in the Python dictionary of
the cab, the black box, the physics log or the network. No change in
behaviour (eu07/maszyna#148).

* refactor(physics): fcfuH takes fcfu without writing it out and reading it back

A definition of an induction motor drive without fcfuH gave the dynamic
brake fcfu through text: std::to_string() of the value as the default of
extract_value(). The loader assigns it now. For any figure of up to six
decimals the value is the same to the bit (the test compares both ways over
more than 70000 figures, and through the loader); the game's definitions
have one or two. Only a figure of more than six decimals, which the text
rounded to six, or one past the largest value, which read back as 0 from
"inf", gives another; the test pins both (eu07/maszyna#99).
2026-11-25 05:14:50 +01:00
..