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).
This commit is contained in:
1 parent
e43f8fa446
commit
9142e1c7ce
1 file changed
+8
@@ -151,6 +151,14 @@ namespace Cthangover.ResourceAtlas
|
|||||||
Provide(result, "scene_file", file.Substring("scenes/".Length), mod.Id, file);
|
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))
|
foreach (var file in ModFileReader.ListFiles(provider, "locale", true))
|
||||||
{
|
{
|
||||||
if (file.EndsWith(".properties", StringComparison.OrdinalIgnoreCase))
|
if (file.EndsWith(".properties", StringComparison.OrdinalIgnoreCase))
|
||||||
|
|||||||
Reference in new issue
Block a user