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.
This commit is contained in:
maj00r
2026-09-04 21:06:23 +02:00
parent 0444070e12
commit 8e5fe01104
16 changed files with 479 additions and 216 deletions

View File

@@ -96,10 +96,14 @@ public sealed class Scenery
public string DisplayName => System.IO.Path.GetFileNameWithoutExtension(Path);
public string LocalizedDescription =>
/// <summary>
/// The description with any "@key" references resolved against the scenery's
/// own translation files.
/// </summary>
public string LocalizedDescription(ISceneryTranslations translations) =>
string.IsNullOrEmpty(Description)
? ""
: string.Join("\n", Description.Split('\n').Select(SceneryI18n.T));
: string.Join("\n", Description.Split('\n').Select(translations.Translate));
/// <summary>
/// Renders the scenario the simulator should load: the original file with the