Commit Graph

149 Commits

Author SHA1 Message Date
maj00r
1939493b47 Tighten the row spacing in the depot detail panels
5 px between readings to 2, which fits three more lines in the same panel.
2026-09-04 23:09:42 +02:00
maj00r
da1b54cf1f Sort the browser list by the name its rows show
It was ordered on TextureMini while the row prints the skin name whenever the
thumbnail matches the class, so the list looked unsorted.
2026-09-04 23:05:50 +02:00
maj00r
c072898e4f Depot: per-vehicle wagon number, model path, activation after removal
The number editor was pinned to the unit's first car, so every vehicle in a
multiple unit shared one number. Removing a vehicle only moved the highlight,
leaving the starting vehicle and the panels on the deleted one. Drops the tab
strip around the single configuration panel and shortens the consist row when
the thumbnails are small.
2026-09-04 23:04:09 +02:00
maj00r
88fa5a2978 Drop value wrapping, raise the detail row by one line
192 to 207 px, the height of one more reading. Values go back to a single
ellipsised line.
2026-09-04 22:54:15 +02:00
maj00r
f626f47ab1 Give the depot detail panel room for the whole texture tab
At the default 768 px window the row capped at 192 px cut off the last credit
line once values started wrapping.
2026-09-04 22:51:59 +02:00
maj00r
027dff17d9 Let read-only detail values wrap instead of ellipsising
In a 250-390 px panel the label column leaves little room, so operator, depot and
author names lost their ends to the ellipsis.
2026-09-04 22:48:43 +02:00
maj00r
b9f455e33d Show vehicle and texture info when a browser entry is picked
The General and About texture tabs only ever described the selected consist car,
so clicking a vehicle in the list told the user nothing about it.
2026-09-04 22:29:04 +02:00
maj00r
df21ec104f Cut the comments from the refactored code
Three survive: why AppServices is hand-wired, the cp1250 registration trap, and
the IsDieselEngine note carried over from Physics.cs.
2026-09-04 22:24:54 +02:00
maj00r
7849ef9729 Remove the missing-thumbnail mocking
Leaves the plain chain: own thumbnail, other.bmp, drawn wagon.
2026-09-04 22:19:02 +02:00
maj00r
6a21a2fd27 Temporarily make half the thumbnails act as missing 2026-09-04 22:10:25 +02:00
maj00r
b33d7697a0 Fix cp1250 decoding, log unsupported loads
The repositories resolved GetEncoding(1250) in their constructors, before
anything registered CodePagesEncodingProvider - reads fell back to Latin-1 and
Polish characters came out as mojibake.
2026-09-04 22:06:59 +02:00
maj00r
673cda57d7 Keep a language code the starter cannot display in eu07.ini
Matches the old starter: lower case, and an unknown code is left alone.
2026-09-04 21:57:08 +02:00
maj00r
27f0e97b43 Draw a stand-in for a missing thumbnail, pass the language code to eu07.ini
The file was getting "pl" or "en" whatever the user picked, so a simulator with
its own language file started in English.
2026-09-04 21:53:29 +02:00
maj00r
8e87eb8638 Show bare keys in settings, fix the depot detail tabs
Drops the vehicle counter from the General tab, and the texture tab stops
gluing "label: value" into single lines and uses the same rows as General.
2026-09-04 21:41:38 +02:00
maj00r
bce008f0ed Stop printing a default for text-valued setting keys
An absent lang key does not mean English, it means follow the system language.
2026-09-04 21:36:13 +02:00
maj00r
4aec689059 Take the scenario presentation logic out of the code-behind
Scenery tree, fog scale, season dates and timetable lookup become their own
classes.
2026-09-04 21:26:28 +02:00
maj00r
2cbc92ad92 Wire up 7 setting descriptions that existed in the translations but were never shown 2026-09-04 21:22:19 +02:00
maj00r
e969137824 Show the eu07.ini key on every settings row 2026-09-04 21:21:14 +02:00
maj00r
964884bd56 Extract starting the simulator into StartSimulation
The click handler is left with asking the user things and showing the result.
2026-09-04 21:14:52 +02:00
maj00r
3c502f630d Split Settings into model, serializer, paths and store
698 lines did all of it at once. The mutable CaptureFromUi callback becomes an
ISettingsCapture the settings view implements.
2026-09-04 21:13:06 +02:00
maj00r
8e5fe01104 Take the remaining I/O out of the domain and drop AppState.Instance
Scenery translations and load weights get repositories; AppState moves to the
application layer.
2026-09-04 21:06:23 +02:00
maj00r
0444070e12 Move rolling stock and physics into the domain
VehicleDatabase becomes VehicleCatalog, Physics becomes VehiclePhysics, and the
textures.txt and .fiz parsers move to Infrastructure. GameLibrary replaces the
GameData singleton.
2026-09-04 21:03:08 +02:00
maj00r
789f0dd1c9 Make Scenery a domain aggregate with no I/O
Parsing and loading move to Infrastructure/Sceneries. Weather becomes a value
object owning the "does this differ from the file" rule.
2026-09-04 20:53:50 +02:00
maj00r
a3137a27c4 Introduce layers, ports and a composition root
Ports in Application/Abstractions, adapters in Infrastructure, hand-wired
AppServices (no reflection, as PublishAot requires). Adds a test project.
2026-09-04 20:46:51 +02:00
maj00r
aef086e9f0 WIP: settings sections, shortcuts window, depot tweaks 2026-09-04 20:40:47 +02:00
maj00r
bcf266a167 4 px above the settings tab strip 2026-08-31 00:46:15 +02:00
maj00r
b48fbcf426 1.4.0.0 2026-08-31 00:44:56 +02:00
maj00r
2b17fb3c6a join the selected tab with the panel below it 2026-08-31 00:44:56 +02:00
maj00r
8ed3765562 read rolling stock from dynamic/*/*/textures.txt, drop vehicles.json 2026-08-31 00:44:56 +02:00
maj00r
6a7255afdf skip the optional-include regex when a scenery has no marker 2026-08-31 00:44:56 +02:00
maj00r
43a361ff89 split depot into domain and view classes 2026-08-31 00:44:48 +02:00
maj00r
04b0805703 log swallowed exceptions and missing translation keys 2026-08-31 00:44:42 +02:00
maj00r
eb304aa4c7 log avalonia warnings and write bledy.txt as it goes 2026-08-31 00:44:36 +02:00
maj00r
b5fabf79f5 compile bindings for texture base window 2026-08-30 23:03:38 +02:00
maj00r
85de34c70c repository url fix 2026-08-30 22:34:01 +02:00
maj00r
33491262af Merge branch 'main' into wip/pre-reinstall 2026-08-30 22:31:26 +02:00
maj00r
563a937eb9 wider migration from old starter 2026-08-30 22:29:45 +02:00
maj00r
c7853f6588 Leave shaders/tonemapping.glsl alone and validate the sim executable
Shaders: drop ApplyHdrShader and FindBundled. The Pascal starter only copied
starter/Reinhard.glsl over shaders/tonemapping.glsl when the user picked an
operator in the HDR combo (uSettings.pas ChangeHDR, its only caller being
cbHDRChange), never on an ordinary save. We ran it from SaveTo, so every save
replaced the file the game ships. That file has been tracked in the game repo
since 2020 and now defaults to AgX, so overwriting it with a 2021-vintage
Reinhard was a two-generation downgrade that also lost the NaN/Inf sanitize.
Also comments out gfx.postfx.tonemapping on save; the engine has no such key.

Executable: ResolveExecutable now validates its pick (file exists, has an
execute bit outside Windows, and the MZ/ELF header matches the running OS) and
returns the first candidate that passes instead of the first that matches by
name. .exe is no longer a Linux candidate - a Steam install with the native
binary still zipped would otherwise resolve to the Windows PE. On failure the
problem reaches the caller, and MainWindow shows it instead of swallowing the
exception, so a launch that does nothing is no longer silent. A manual pick
whose file is temporarily missing is kept in the combo rather than falling back
to auto and being overwritten on the next save.

Claude-Session: https://claude.ai/code/session_01HamVNWE9mwmz1vs2iEpNQq
2026-08-29 16:42:36 +02:00
maj00r
3b7a8135ea Strip all comments from the C# sources
Removes every // and /// comment from the 28 .cs files, -1331 lines.

Done with a lexer rather than a regex: the sources carry plenty of // inside
string literals (@"//\$decor\b", the //$o trainset directives, sb.Append("// "),
"https://wiki.eu07.pl/") and those must survive. It tracks regular, verbatim and
interpolated strings, interpolation holes and char literals. Every file was
checked by comparing the sequence of string-literal characters before and after
the strip; all 28 match. BOMs preserved, blank-line runs collapsed to one.

Claude-Session: https://claude.ai/code/session_01HamVNWE9mwmz1vs2iEpNQq
2026-08-29 16:42:11 +02:00
maj00r
969a5b9494 scenario time override fix 2026-08-28 22:08:38 +02:00
7bd1a3c81d Merge pull request #22 from maj00r/main
Publish rolling pre-releases for main and staging
2026-08-25 23:56:16 +02:00
maj00r
20da0a4f77 Keep the Windows package zipped on the way to the release
download-artifact unpacks a zip it detects, so the Windows package arrived in
dist/ as loose files (Starter.exe, the native dlls, startercfg/) and gh tried
to upload the startercfg directory as a release asset. skip-decompress leaves
the artifact as the file it was uploaded as.

The two packages are also named explicitly instead of globbing dist/*, so a
missing one fails the step rather than quietly publishing half a release.
2026-08-25 23:50:59 +02:00
maj00r
5d29d6031d Download the packages with download-artifact v8
The packages are uploaded with archive: false, and non-zipped artifacts can
only be fetched by v8 of download-artifact - v7 fetched the first one, then
failed the run with "Unable to download and extract artifact".
2026-08-25 23:46:27 +02:00
maj00r
caf1c6d0b3 Bring the build workflow over from main
The file did not exist on this branch (it was cut before the workflow landed
on main), so a merge would have shown it as new. It is copied verbatim: this
branch is not in the push triggers and builds nothing on its own.
2026-08-25 23:42:52 +02:00
maj00r
5e4416c9cb Publish rolling pre-releases for main and staging
Workflow artifacts can only be downloaded by signed-in users with access to
the repository, so they are useless for handing a build to anyone else. After
the matrix publishes, a release job recreates a rolling pre-release from the
same packages; its assets are downloadable without an account:

  releases/download/latest/<file>    from main
  releases/download/staging/<file>   from staging

Each branch owns its tag, so a staging build never overwrites the main one.
The release is deleted and created again rather than edited, so the tag
follows its branch and assets from an older build do not linger. Write access
is granted to that job only, the workflow default stays read.
2026-08-25 23:38:26 +02:00
maj00r
e3caa9d38f Fix the language picker and tidy the graphics tab
Both language combos decided a change was the user's by checking
IsKeyboardFocusWithin on the picked item. Selecting with the mouse leaves the
focus on the combo, not on the item, so on Windows the check failed and the
language never changed. The handlers now compare the picked code with the one
already loaded instead of guessing who caused the event: filling the combo in
selects what is loaded and stops there, a real pick differs and applies.

The settings tab listed a hard-coded Polski / English pair and wrote the
language back as "Polski" or "English", so picking Czech, Hungarian or
Russian in the top bar was overwritten on save. It is filled from lang/ now,
and writes back the selected entry.

LocalizationService gains a LanguageChanged event: the main window rebuilds
the captions that code builds once (train stats, panel headers, combo items)
from there, so a pick in either place refreshes them. Its PropertyChanged
also names the indexer "Item[]", which is what bindings listen for.

Graphics tab: the track-curve quality slider moves over from Physics, the
view angle shows a degree sign instead of the Polish "stopni", and the HDR
tone-mapping picker is gone - only Reinhard.glsl ever shipped, so
ApplyHdrShader copies that one and the starter.hdr setting is dropped.
2026-08-25 22:17:11 +02:00
maj00r
4d8976e43d Pad the top bar down on Windows instead of the right cluster
The 146px right margin pushed the version and social icons inwards on every
window width. Padding the whole bar down by the caption height gives the OS
buttons a strip of their own and leaves the cluster where it was; the strip
drags the window, so the handler moves to the bar's border.
2026-08-25 21:56:31 +02:00
maj00r
7503765aca additional margin for M$ product 2026-08-25 21:44:19 +02:00
maj00r
f9960e5113 updated translations [wip] 2026-08-25 21:22:39 +02:00
maj00r
9e2166065b Rework the depot browser layout and confirm a crewless start
The vehicle database panel loses its header bar and packs the search box and
the archival filter into one line, the class combo takes a full-width line of
its own with a miniature (big in the drop-down, one line when closed) and the
bulk / texture-base actions move into the Add button's drop-down. The mini
preview sits beside the texture data and stays hidden until an entry is
picked, so the list keeps the space.

Picking a class or a vehicle now fills both combos in, and a class alone is a
valid filter (it used to leave the list empty without a category). The combos
and the list are rebuilt on the next dispatcher pass, since clearing Items
from inside the SelectionChanged that asked for it throws.

Vehicle removal becomes a per-card tool next to flip / crew, the scenery and
vehicle names move into their panel headers, and the texture randomizer
dialog sizes to its content instead of clipping its last button.

Start no longer hides behind Ctrl: a consist with no crew and no passenger
says so on the button and asks for confirmation before launching.
2026-08-25 20:58:57 +02:00