summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentCoordinator.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-18 20:02:12 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-18 20:02:12 -0400
commitcb11f1e2ca907cf9d99d5ff76c40b2d0b2957ceb (patch)
tree2ffa2589196ecdea910eb0a683b0e9a8e2df9e50 /src/SMAPI/Framework/ContentCoordinator.cs
parent3a161a30a7faa2d69ebe08938cd68f43921b4a81 (diff)
downloadSMAPI-cb11f1e2ca907cf9d99d5ff76c40b2d0b2957ceb.tar.gz
SMAPI-cb11f1e2ca907cf9d99d5ff76c40b2d0b2957ceb.tar.bz2
SMAPI-cb11f1e2ca907cf9d99d5ff76c40b2d0b2957ceb.zip
re-add internal content manager for asset propagation
This will be used by the new asset propagation in SMAPI 4.0 & Stardew Valley 1.6.
Diffstat (limited to 'src/SMAPI/Framework/ContentCoordinator.cs')
-rw-r--r--src/SMAPI/Framework/ContentCoordinator.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ContentCoordinator.cs b/src/SMAPI/Framework/ContentCoordinator.cs
index 2b13f57a..da8f0da9 100644
--- a/src/SMAPI/Framework/ContentCoordinator.cs
+++ b/src/SMAPI/Framework/ContentCoordinator.cs
@@ -151,8 +151,23 @@ namespace StardewModdingAPI.Framework
onAssetLoaded: onAssetLoaded
)
);
+
+ var contentManagerForAssetPropagation = new GameContentManagerForAssetPropagation(
+ name: nameof(GameContentManagerForAssetPropagation),
+ serviceProvider: serviceProvider,
+ rootDirectory: rootDirectory,
+ currentCulture: currentCulture,
+ coordinator: this,
+ monitor: monitor,
+ reflection: reflection,
+ onDisposing: this.OnDisposing,
+ onLoadingFirstAsset: onLoadingFirstAsset,
+ onAssetLoaded: onAssetLoaded
+ );
+ this.ContentManagers.Add(contentManagerForAssetPropagation);
+
this.VanillaContentManager = new LocalizedContentManager(serviceProvider, rootDirectory);
- this.CoreAssets = new CoreAssetPropagator(this.MainContentManager, this.Monitor, reflection, name => this.ParseAssetName(name, allowLocales: true));
+ this.CoreAssets = new CoreAssetPropagator(this.MainContentManager, contentManagerForAssetPropagation, this.Monitor, reflection, name => this.ParseAssetName(name, allowLocales: true));
this.LocaleCodes = new Lazy<Dictionary<string, LocalizedContentManager.LanguageCode>>(() => this.GetLocaleCodes(customLanguages: Enumerable.Empty<ModLanguage>()));
}