From 9142e1c7ce01bbafb4bcf2e26279bb6f941bf8c7 Mon Sep 17 00:00:00 2001 From: iisaev Date: Sun, 18 Oct 2026 19:31:05 +0200 Subject: [PATCH] Same-named scenario of a dependent mod replaces the original Scenarios now follow the rule files and entities already use: a mod adds content under its own names and replaces another mod's scenario by shipping the same file name and depending on it (later in load order wins, even across scenes). The resource atlas reports one scenario name in mods not linked by depends. Documented in AGENTS.md and the site docs (load order, scenarios). --- src/ResourceAtlasBuilder.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ResourceAtlasBuilder.cs b/src/ResourceAtlasBuilder.cs index 792b610..0c2ea02 100644 --- a/src/ResourceAtlasBuilder.cs +++ b/src/ResourceAtlasBuilder.cs @@ -151,6 +151,14 @@ namespace Cthangover.ResourceAtlas Provide(result, "scene_file", file.Substring("scenes/".Length), mod.Id, file); } + foreach (var file in ModFileReader.ListFiles(provider, "scenarios", true)) + { + // Scenarios are identified by file name: a mod replaces another + // mod's scenario by shipping the same name and depending on it. + if (file.EndsWith(".scenario", StringComparison.OrdinalIgnoreCase)) + Provide(result, "scenario", Path.GetFileNameWithoutExtension(file), mod.Id, file); + } + foreach (var file in ModFileReader.ListFiles(provider, "locale", true)) { if (file.EndsWith(".properties", StringComparison.OrdinalIgnoreCase))