Expose mod.yaml content to localisation.
Mod metadata, load screens and mod content is all now sourced from ftl files, allowing these items to be translated. Translations are now initialized as part of ModData creation, as currently they are made available too late for the usage we need here. The "modcontent" mod learns a new parameter for "Content.TranslationFile" - this allows a mod to provide the path of a translation file to the mod which it can load. This allows mods such as ra, cnc, d2k, ts to own the translations for their ModContent, yet still make them accessible to the modcontent mod. CheckFluentReference learns to validate all these new fields to ensure translations have been set.
This commit is contained in:
@@ -93,9 +93,6 @@ namespace OpenRA.Server
|
||||
modData.MapCache.LoadPreviewImages = false; // PERF: Server doesn't need previews, save memory by not loading them.
|
||||
modData.MapCache.LoadMaps();
|
||||
|
||||
// HACK: Related to the above one, initialize fluent so we can resolve lobby option ids to strings.
|
||||
FluentProvider.Initialize(modData, modData.DefaultFileSystem);
|
||||
|
||||
var endpoints = new List<IPEndPoint> { new(IPAddress.IPv6Any, settings.ListenPort), new(IPAddress.Any, settings.ListenPort) };
|
||||
var server = new Server(endpoints, settings, modData, ServerType.Dedicated);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user