summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Content
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-25 23:53:30 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-25 23:53:30 -0400
commit3707f481a567df5149aea00ffb14cddb7b14fccb (patch)
treea078b00dd396853ed23f4f542d1877d6a40c3482 /src/SMAPI/Framework/Content
parent021891ff0ceb6b327bc196c336aa56ddfaf99b0e (diff)
downloadSMAPI-3707f481a567df5149aea00ffb14cddb7b14fccb.tar.gz
SMAPI-3707f481a567df5149aea00ffb14cddb7b14fccb.tar.bz2
SMAPI-3707f481a567df5149aea00ffb14cddb7b14fccb.zip
extend load conflict resolution into load priority (#766)
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r--src/SMAPI/Framework/Content/AssetLoadOperation.cs11
1 files changed, 6 insertions, 5 deletions
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
/// <summary>The content pack on whose behalf the asset is being loaded, if any.</summary>
public IModMetadata OnBehalfOf { get; }
- /// <summary>Whether to allow skipping this operation to resolve a load conflict.</summary>
- public bool AllowSkipOnConflict { get; }
+ /// <summary>If there are multiple loads that apply to the same asset, the priority with which this one should be applied.</summary>
+ public AssetLoadPriority Priority { get; }
/// <summary>Load the initial value for an asset.</summary>
public Func<IAssetInfo, object> GetData { get; }
@@ -26,13 +27,13 @@ namespace StardewModdingAPI.Framework.Content
*********/
/// <summary>Construct an instance.</summary>
/// <param name="mod">The mod applying the edit.</param>
- /// <param name="allowSkipOnConflict">Whether to allow skipping this operation to resolve a load conflict.</param>
+ /// <param name="priority">If there are multiple loads that apply to the same asset, the priority with which this one should be applied.</param>
/// <param name="onBehalfOf">The content pack on whose behalf the asset is being loaded, if any.</param>
/// <param name="getData">Load the initial value for an asset.</param>
- public AssetLoadOperation(IModMetadata mod, bool allowSkipOnConflict, IModMetadata onBehalfOf, Func<IAssetInfo, object> getData)
+ public AssetLoadOperation(IModMetadata mod, AssetLoadPriority priority, IModMetadata onBehalfOf, Func<IAssetInfo, object> getData)
{
this.Mod = mod;
- this.AllowSkipOnConflict = allowSkipOnConflict;
+ this.Priority = priority;
this.OnBehalfOf = onBehalfOf;
this.GetData = getData;
}