diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-02-19 23:20:55 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-02-19 23:20:55 -0500 |
commit | 2e9807a034a84d7e1ce821e92671a655ce13b199 (patch) | |
tree | 37d079ec050320c97412f3e7bec144b52fc78ed4 /src/SMAPI/Framework/ModHelpers | |
parent | 82d1e92d9740d89705c633731d52c1ec924a4b1c (diff) | |
download | SMAPI-2e9807a034a84d7e1ce821e92671a655ce13b199.tar.gz SMAPI-2e9807a034a84d7e1ce821e92671a655ce13b199.tar.bz2 SMAPI-2e9807a034a84d7e1ce821e92671a655ce13b199.zip |
rework tilesheet loading to improve errors, allow future validation, and drop support for legacy content files
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers')
-rw-r--r-- | src/SMAPI/Framework/ModHelpers/ContentHelper.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs index 043ae376..e9b70845 100644 --- a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs @@ -32,7 +32,7 @@ namespace StardewModdingAPI.Framework.ModHelpers /// <summary>The friendly mod name for use in errors.</summary> private readonly string ModName; - /// <summary>Encapsulates monitoring and logging for a given module.</summary> + /// <summary>Encapsulates monitoring and logging.</summary> private readonly IMonitor Monitor; @@ -70,9 +70,11 @@ namespace StardewModdingAPI.Framework.ModHelpers public ContentHelper(ContentCoordinator contentCore, string modFolderPath, string modID, string modName, IMonitor monitor) : base(modID) { + string managedAssetPrefix = contentCore.GetManagedAssetPrefix(modID); + this.ContentCore = contentCore; - this.GameContentManager = contentCore.CreateGameContentManager(this.ContentCore.GetManagedAssetPrefix(modID) + ".content"); - this.ModContentManager = contentCore.CreateModContentManager(this.ContentCore.GetManagedAssetPrefix(modID), modFolderPath, this.GameContentManager); + this.GameContentManager = contentCore.CreateGameContentManager(managedAssetPrefix + ".content"); + this.ModContentManager = contentCore.CreateModContentManager(managedAssetPrefix, modName, modFolderPath, this.GameContentManager); this.ModName = modName; this.Monitor = monitor; } |