summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentManagers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-26 01:43:40 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-26 01:43:40 -0400
commitad8912047beaf84ce34f4918703d55841be13ff0 (patch)
treee7f8c44c4a58bf2baf568b98793c051be6c41cd1 /src/SMAPI/Framework/ContentManagers
parente40907ab8b97bd8a557adf683a406413646b1fc5 (diff)
downloadSMAPI-ad8912047beaf84ce34f4918703d55841be13ff0.tar.gz
SMAPI-ad8912047beaf84ce34f4918703d55841be13ff0.tar.bz2
SMAPI-ad8912047beaf84ce34f4918703d55841be13ff0.zip
add asset edit priority (#766)
Diffstat (limited to 'src/SMAPI/Framework/ContentManagers')
-rw-r--r--src/SMAPI/Framework/ContentManagers/GameContentManager.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/GameContentManager.cs b/src/SMAPI/Framework/ContentManagers/GameContentManager.cs
index 16eddb00..a121f4c0 100644
--- a/src/SMAPI/Framework/ContentManagers/GameContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/GameContentManager.cs
@@ -82,9 +82,12 @@ namespace StardewModdingAPI.Framework.ContentManagers
AssetLoadOperation[] loaders = this.GetLoaders<object>(info).ToArray();
if (!this.AssertMaxOneRequiredLoader(info, loaders, out string error))
+ {
this.Monitor.Log(error, LogLevel.Warn);
+ return false;
+ }
- return loaders.Length == 1;
+ return loaders.Any();
}
/// <inheritdoc />
@@ -334,7 +337,7 @@ namespace StardewModdingAPI.Framework.ContentManagers
}
// edit asset
- AssetEditOperation[] editors = this.GetEditors<T>(info).ToArray();
+ AssetEditOperation[] editors = this.GetEditors<T>(info).OrderBy(p => p.Priority).ToArray();
foreach (AssetEditOperation editor in editors)
{
IModMetadata mod = editor.Mod;