mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 06:26:01 +01:00
fix(simulation): a test doesn't read the player's own eu07.ini
The simulator reads eu07.ini from %APPDATA%/MaSzyna (~/.config/MaSzyna on Linux) when there is one, in place of the game folder's. A test run then depended on whose machine it ran on. With --test only the game folder's eu07.ini is read, then the files given with -ini. The test mode options are taken from the command line before the settings for that; --test-timeout still wins over test.timeout of any settings file.
This commit is contained in:
@@ -19,6 +19,9 @@ eu07 --test -s <scenery.scn> [--test-timeout <seconds>] [-seed <number|word>] [-
|
||||
With `--test` the simulator:
|
||||
|
||||
- needs `-s`; `-v` is ignored and every train is driven by AI (ghostview),
|
||||
- reads the settings of the game folder's `eu07.ini` and of the files given with `-ini` (in that
|
||||
order), not the player's own `eu07.ini` in `%APPDATA%\MaSzyna` (`~/.config/MaSzyna` on Linux),
|
||||
so a test runs the same for whoever runs it,
|
||||
- draws nothing: the null renderer loads the 3D models (the physics needs some of their
|
||||
data) but no textures, and the window stays hidden,
|
||||
- has no sound, no network, no python, no pause (not even one set by the scenery), and
|
||||
|
||||
@@ -62,7 +62,8 @@ EXIT_RESULTS = {
|
||||
14: "error",
|
||||
}
|
||||
|
||||
# settings layered over the user's eu07.ini for a test run; the window ones only matter
|
||||
# settings layered over the game's eu07.ini for a test run (test mode doesn't read the player's own
|
||||
# in %APPDATA%); the window ones only matter
|
||||
# with --watch, test mode keeps its window hidden and turns the sound off by itself
|
||||
TEST_INI = """\
|
||||
fullscreen no
|
||||
|
||||
Reference in New Issue
Block a user