From ad8912047beaf84ce34f4918703d55841be13ff0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 26 Mar 2022 01:43:40 -0400 Subject: add asset edit priority (#766) --- src/SMAPI/Framework/ContentManagers/GameContentManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/SMAPI/Framework/ContentManagers') 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(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(); } /// @@ -334,7 +337,7 @@ namespace StardewModdingAPI.Framework.ContentManagers } // edit asset - AssetEditOperation[] editors = this.GetEditors(info).ToArray(); + AssetEditOperation[] editors = this.GetEditors(info).OrderBy(p => p.Priority).ToArray(); foreach (AssetEditOperation editor in editors) { IModMetadata mod = editor.Mod; -- cgit