Commit Graph

246 Commits

Author SHA1 Message Date
maj00r
dee54a34bb feat: check the terrain files a scenery's terrain directive names
eu07 reads static terrain from files named by "terrain ... endterrain":
text (.txtf) or its binary version (.btf). The scenery check now tells a
terrain file of which neither is there (MissingTerrainFile).

Such a file also takes the place of the scenery's .sbt, so the terrain
includes after it are read after all and a missing one is told again. When
the .sbt was already used before the directive - a terrain include or
terrain geometry passed over, or FirstInit - the simulator passes the file
over instead, which is told too (TerrainFileBehindSbt). The parser takes
the lookup of files and whether there is an .sbt as one SceneryFileLookup.
2026-11-13 17:46:27 +01:00
maj00r
7cd3ef8f1a test: the in-memory disk has the root of an absolute Linux path 2026-11-13 17:44:26 +01:00
maj00r
1b41ef752a chore: version 1.6
Data names are now found whatever their letter case on Linux.
2026-11-13 16:23:47 +01:00
maj00r
42f702a096 fix: an include in other letter case is no fault, as eu07 opens it
eu07 now finds files whatever the case of their names on Linux too
(MaSzyna-EU07/maszyna#362), so the starter no longer folds an include or a
scenery's .sbt to lower case to judge whether the simulator opens it: it
looks them up through CaseInsensitivePaths. The IncludeLetterCase fault and
its texts go, being a false alarm now, and the parser takes a plain yes or
no for each include.
2026-11-13 16:23:47 +01:00
maj00r
7f57160aae fix: open a livery's folder whatever the case of its name
"Open texture folder" finds the folder under dynamic, or from the game
folder, through CaseInsensitivePaths, so on Linux it opens the folder
when textures.txt names it in other letter case.
2026-11-13 16:23:47 +01:00
maj00r
2efae83b57 fix: find the loading screen logo whatever the case of its name
The textures/logo folder and a trainset's or scenery's logo in it are
looked up through CaseInsensitivePaths, with extensions in any case, so
on Linux the chosen logo is shown instead of a random one or none. The
lookup takes the file system, so it is tested.
2026-11-13 16:23:47 +01:00
maj00r
34f2ce99e8 fix: list files whatever the case of their extensions on Linux
PhysicalFileSystem matches a search pattern case-insensitively, as on
Windows, so X.SCN, .BMP minis and .FIZ files of data made on Windows are
listed on Linux as well.
2026-11-13 16:23:47 +01:00
maj00r
52408a9931 fix: follow .fiz includes and check vehicle files whatever their case
An include in a .fiz is looked up in the vehicle's folder through
CaseInsensitivePaths, so its physics are read on Linux when the include
names the file in other letter case. The missing-asset scan finds skins and
models the same way, with extensions in any case, instead of reporting
files that are there.
2026-11-13 16:23:47 +01:00
maj00r
290b753f40 fix: open a scenery's attachments whatever the case of their names
A //$f attachment is looked up from the game folder through the new
AttachmentLocator, so on Linux its button is enabled and opens the file
when the scenery names it in other letter case or with backslashes.
2026-11-13 16:23:47 +01:00
maj00r
6279228a7d fix: find a scenery's i18n tables whatever the case of their names
The i18n folder and its <scenery>_<language>.json tables are looked up
through CaseInsensitivePaths, so on Linux a scenery's texts are translated
when the table is named in other letter case than the scenery file.
2026-11-13 16:23:47 +01:00
maj00r
d4975796a8 fix: find a scenery's image and timetables whatever the case of their names
The //$i image and a trainset's timetable are looked up through
CaseInsensitivePaths, so on Linux they show when the scenery names them in
other letter case than the disk has. A timetable written with backslashes
is found there too, and with it the train number of a Hasler tape.
2026-11-13 16:23:47 +01:00
maj00r
48af11b4b2 refactor: share the case-insensitive lookup of data files
The scenery repository's include lookup becomes CaseInsensitivePaths, which
takes any folder over IFileSystem and gives a name as it is on disk. Of
folders named alike in other case it now tries each, not only the first.
A name is joined to the folder as the simulator joins it, a leading slash
counting for nothing. IFileSystem tells whether the disk ignores case; there,
as on Windows, a name missed as written is not looked for any further, so
no folder is listed.
2026-11-13 16:23:47 +01:00
maj00r
744720d922 Merge pull request #44 from MaSzyna-EU07/fix/dotted-model-names
fix: a dot in a model name is part of the name, not an extension
v1.5.234
2026-11-12 21:33:51 +01:00
maj00r
b5ba67430f fix: a dot in a model name is part of the name, not an extension
The 9-107 and 9-110 coal wagons (9-107.13.fiz and the like) found no physics, so no load could be set on them.
2026-11-12 20:57:36 +01:00
maj00r
c261d4b0ab Merge pull request #43 from MaSzyna-EU07/fix/version-no-suffix
fix: the version is the number alone, with no public beta after it
v1.5.232
2026-11-12 19:41:31 +01:00
maj00r
3aa6a256a5 fix: the version is the number alone, with no public beta after it 2026-11-12 19:38:11 +01:00
maj00r
95c510b3ac Merge pull request #41 from MaSzyna-EU07/fix/version-in-title
The version in the window's title
v1.5.230
2026-11-12 17:44:17 +01:00
maj00r
5af567be7f Merge pull request #40 from MaSzyna-EU07/feature/blackbox
Black box player: the simulator's recording of a run on a map, with the cab, the timetable and a summary
v1.5.228
2026-11-12 17:44:02 +01:00
maj00r
b201b6f7ab Merge pull request #42 from MaSzyna-EU07/fix/consist-strip-selection
fix(scenarios): frame the vehicle started in, no background line between vehicles
2026-11-12 17:43:46 +01:00
maj00r
3a19fd5da2 Merge pull request #38 from MaSzyna-EU07/feat/sonarcloud-analysis
ci: analyse with SonarQube Cloud
v1.5.207
2026-11-11 20:16:17 +01:00
maj00r
36df14abee fix(scenarios): the vehicle started in is framed, and no line of the background shows between two vehicles at a scale such as 125 % 2026-11-11 19:01:57 +01:00
maj00r
59dbd9cc0d fix(tapes): a refresh of the list leaves the paper of an unreadable tape hidden 2026-11-11 18:51:47 +01:00
maj00r
3ef630459c fix(tapes): a session with no tape shows no blank paper beside the words 2026-11-11 18:51:04 +01:00
maj00r
b7eefcd0ed fix(tapes): a session picked with no tape stays picked when the list refreshes, and an empty one says it has no black box either 2026-11-11 18:25:54 +01:00
maj00r
9b5848042a fix(tapes): a tape written after another run began is not the launch's before it, and a session with only a black box shows no other session's tape 2026-11-11 18:21:27 +01:00
maj00r
ef551a4ee7 fix(tapes): a scenery named with letters outside ASCII matches its black box on Linux too, where each byte of them is a '_' 2026-11-11 18:14:44 +01:00
maj00r
cf5cea26ad fix(tapes): a black box goes with the launch it started after and of its own scenery, not every one written after the last launch 2026-11-11 18:12:11 +01:00
maj00r
91158ebf72 fix(tapes): the moment asked while a file is read goes to the window still open, not one closed meanwhile 2026-11-11 18:05:45 +01:00
maj00r
cdc35c44e5 fix(tapes): no mark from a closed black box, the mark kept right through a view changed or a stop, the moment asked while a file is read kept, no jump back on a live re-read, the hint where it fits 2026-11-11 18:04:43 +01:00
maj00r
fa36284de1 feat(tapes): a click on the tape takes the black box of its session to that moment, and where the black box plays is marked on the tape 2026-11-11 17:55:56 +01:00
maj00r
da5a1efea1 fix: the version in the window's title, where it has room at any width 2026-11-11 17:53:01 +01:00
maj00r
9872b316c2 fix(blackbox): the traction's values in two columns, each whole in its cell 2026-11-11 03:19:14 +01:00
maj00r
ed9c1394bd fix(blackbox): the driver's valve as its gauge shows, no clash of the traction's labels, fewer self-made events
- The pressure of the driver's valve is named as what its gauge shows
  (the equalizing reservoir, the FV4a's time reservoir), alike in both
  languages.
- The traction's values are clipped to their columns, and the torque
  converter's label is shorter: it ran into the oil pressure's.
- The doors in two columns, the radio's label shorter: the names were cut.
- The compressor and the motor fans go on and off by themselves: no
  events for them.
- The summary of HeadCodes.Right back above it.
2026-11-11 02:55:42 +01:00
maj00r
0d16524953 feat(blackbox): the cab panel as fits the vehicle, every switch the driver worked in the events
- The rest of the cab record is read when written: what drives the
  vehicle, the doors' permits and departure signal, the brakes of the
  whole train, a diesel's oil and temperatures, the cruise control and
  the rest.
- Cab panel: the traction as fits what drives the vehicle (voltage and
  current of an electric one; revolutions, oil pressure and temperatures
  of a diesel; clutch or torque converter of a mechanical or hydraulic
  one; nothing for a draisine), the equalizing reservoir, the main
  reservoir pipe and the most braked cylinder of the train, the brakes'
  setting and mode, a group of the doors, the pumps of a diesel where an
  electric vehicle has its pantographs, the hand brake, the releaser, the
  horn's tone, the radio's channel, the integrated handle of a unit.
- Events: every switch on and off, doors opened and closed, the departure
  signal, the hand brake, the brakes' setting, the radio channel, the
  cruise control's speed; moving with the doors open and an overheating
  engine as faults.
- A vehicle with no lamps at an end (a draisine) is not judged on its
  lights, and one which never had a voltage shows none.
2026-11-11 02:43:51 +01:00
maj00r
4dcfd1c4e3 fix(blackbox): the timeline's labels on a narrow timeline, marks out of view, the cab on a short window
- The hover label and the clock bubble keep to the left edge on a
  narrow timeline instead of throwing in Render.
- A mark is told under the pointer only when it is drawn: within the
  plot and the time shown.
- The device groups are clipped at their own width, not 4 px short.
- On a short window the cab card scrolls, so the list above it keeps
  room for a few rows.
2026-11-11 01:50:40 +01:00
maj00r
9ee059bc16 feat(blackbox): a readable map legend, a key for the timeline's marks, the cab panel in titled parts
- Map legend: a title for each part, the texts in the text colour, the
  speed bands said in full ("up to 5 km/h faster than the AI").
- Timeline: the key names every mark (station, W6, signal passed,
  coupling, autopilot, command), the row of marks has its name, and the
  mark under the pointer is told in a label. The key no longer sits on
  the station plates.
- Cab panel: titled parts (controls, brakes, traction, lights, devices);
  the AI's speed and the next limit no longer run into the controllers;
  the lights of each end with the signal they show, and the one they are
  to show when it differs; the devices in three groups (power, driving,
  safety) instead of one long list.
2026-11-11 01:45:40 +01:00
maj00r
88adf5ee0f Black box: the test of an older recording's light pattern checks the lights were judged 2026-11-11 01:09:46 +01:00
maj00r
de3f088ba8 Black box: older recordings read as before, single vehicles told apart, each platform end its own tolerance
- A light pattern asked for in a recording made before the lamps were
  written is checked as the signal it shows, as before.
- Whether the couplings were written is told by the format (the
  movement in the cab samples), not by there being any: a recording
  where every train is a single vehicle has none, and the user going
  over to another vehicle left the timetable shown.
- The 2 m a train may stand off the platform is at each end, not for
  both together.
2026-11-11 01:05:59 +01:00
maj00r
532875fc7b Black box: the queries of the user's train worked out once a read, lights as the driver checks them
- The stations, the signals passed, the horn points, the couplings, the
  consists and the timetable progress of the user's train are kept until
  a read adds something; the views asked for them every frame, which on
  a long session with many trains took the window down. A read that adds
  nothing no longer counts as a change.
- The lights are checked against the lamps the vehicles at the ends have
  (written by the simulator from now on), as its driver checks them: Pc 1
  without the upper headlight, with the auxiliary lamps, Pc 5 with the
  rear-end signals. Only while the user drives: the autopilot's lights
  are its own.
- A train off the platform counts at both ends: its head past the stop
  point as well as its tail before the platform's end.
- A recording without the couplings keeps the timetable for any vehicle
  of the user.
- A signal passed at danger is ringed on the map only once it was.
- In the tapes window a black box opens on a click or Enter, not when
  the arrow keys go over it.
- The viewer's screenshot of a window not laid out saves nothing and
  still closes.
2026-11-11 00:57:57 +01:00
maj00r
e530b95352 Play back the black box of the simulator: map, cab, timeline, timetable and a summary
The simulator writes a black box of each run to physicslog/*.blackbox
(blackbox_doc.md in the maszyna repository). Three new projects read and
show it:

- Eu07.BlackBox: the reader of the records, the recording as a whole
  (the user's vehicle and consist at a time, the timetable shown, the
  progress along it with arrival and departure delays, whether the
  train stood at the platform), the light patterns Pc 1, Pc 2, Pc 5 and
  Tb 1 with the ones the run asks for, and a summary of the driving.
- Eu07.BlackBox.Views: the player window, with the scenery map (tracks,
  signals, W4 stop points with their heading and W32, the train, the
  cameras), the cab, the timeline of speed against the AI's reference,
  the events, the timetable and the summary.
- Eu07.BlackBox.Viewer: the window on its own, with options for the
  time, following the train and screenshots.

The tapes window of the starter lists the black boxes of each session
beside the Hasler tapes and opens them in the player.
2026-11-11 00:39:35 +01:00
e7d8596652 Merge pull request #37 from MaSzyna-EU07/feature/hasler-tape
Feature/hasler tape
v1.5.205
2026-11-07 14:18:27 +00:00
jerrrrycho
e5330d91a6 ci: analyse with SonarQube Cloud
Runs SonarScanner for .NET around a full build and the tests, with
OpenCover coverage from coverlet, on pushes to main and on pull requests
from branches of this repository. Fork and Dependabot pull requests are
skipped: the C# analysis runs inside the build, so the token and the
built code cannot be kept on separate machines as in maszyna.

The scanner is pinned in .config/dotnet-tools.json for Dependabot.
2026-11-07 06:27:16 +01:00
maj00r
cb092784ae Put the comment of FullPath back on it
It stayed above DlssLibraries, which then had two summaries, when that method
went in between.
2026-11-03 21:51:58 +01:00
maj00r
d68999dfb7 Look at each source file of a scenery once
The watch of scenery files asked three times per file, whether it is there,
its time and its size, every two seconds for every source of every scenery.
One look gives all three.
2026-11-03 21:51:56 +01:00
maj00r
9eb10fc9bd Let the signatures of saved trainsets go with their sceneries
They were kept by the trainset's text for the whole session, behind one lock,
and every reload added more. They are now kept as long as a trainset holds
that text.
2026-11-03 21:51:55 +01:00
maj00r
71c32c5b9a Read the old starter's key descriptions in code page 1250 too
Its language files are code page 1250 as often as UTF-8. Read as UTF-8 only,
Czech and Polish descriptions came out with replacement characters.
2026-11-03 21:51:55 +01:00
maj00r
cf1ba319c1 Leave the settings as they are when they are written
Writing the settings put them right for the simulator, DLSS to TAA on OpenGL
and the like, in the object given. A preview of the changes or a look at the
levels goes through the same write and changed the held settings. A copy is
put right now.
2026-11-03 21:51:54 +01:00
maj00r
02ea1277fc Read the last run's log before a start has to
A start notes down which vehicles the player drove in the run before, as the
log begins anew. With the tape window never opened nothing of a long run's log
had been read yet, and Start waited on the whole of it. It is now read off the
UI thread when the simulator exits and when the starter opens.
2026-11-03 21:51:54 +01:00
maj00r
306bdc44df Write the list of launches beside the tapes in one move
The tape window reads starter-launch.txt every two seconds. Written in place,
the file could be read half written, and a crash during the write lost the
launches noted before.
2026-11-03 21:51:54 +01:00
maj00r
d95182f17c List a key taken out of eu07.ini once
A uart or uarttune the settings no longer write was found missing twice, as a
key of set length and as one the file had, and showed twice among the changes.
2026-11-03 21:51:54 +01:00