From 3707f481a567df5149aea00ffb14cddb7b14fccb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 25 Mar 2022 23:53:30 -0400 Subject: extend load conflict resolution into load priority (#766) --- src/SMAPI/Framework/Content/AssetLoadOperation.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/SMAPI/Framework/Content') diff --git a/src/SMAPI/Framework/Content/AssetLoadOperation.cs b/src/SMAPI/Framework/Content/AssetLoadOperation.cs index 36baf1aa..b12958d6 100644 --- a/src/SMAPI/Framework/Content/AssetLoadOperation.cs +++ b/src/SMAPI/Framework/Content/AssetLoadOperation.cs @@ -1,4 +1,5 @@ using System; +using StardewModdingAPI.Events; namespace StardewModdingAPI.Framework.Content { @@ -14,8 +15,8 @@ namespace StardewModdingAPI.Framework.Content /// The content pack on whose behalf the asset is being loaded, if any. public IModMetadata OnBehalfOf { get; } - /// Whether to allow skipping this operation to resolve a load conflict. - public bool AllowSkipOnConflict { get; } + /// If there are multiple loads that apply to the same asset, the priority with which this one should be applied. + public AssetLoadPriority Priority { get; } /// Load the initial value for an asset. public Func GetData { get; } @@ -26,13 +27,13 @@ namespace StardewModdingAPI.Framework.Content *********/ /// Construct an instance. /// The mod applying the edit. - /// Whether to allow skipping this operation to resolve a load conflict. + /// If there are multiple loads that apply to the same asset, the priority with which this one should be applied. /// The content pack on whose behalf the asset is being loaded, if any. /// Load the initial value for an asset. - public AssetLoadOperation(IModMetadata mod, bool allowSkipOnConflict, IModMetadata onBehalfOf, Func getData) + public AssetLoadOperation(IModMetadata mod, AssetLoadPriority priority, IModMetadata onBehalfOf, Func getData) { this.Mod = mod; - this.AllowSkipOnConflict = allowSkipOnConflict; + this.Priority = priority; this.OnBehalfOf = onBehalfOf; this.GetData = getData; } -- cgit