summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Content/AssetLoadOperation.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-25 22:49:14 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-03-25 22:49:14 -0400
commit021891ff0ceb6b327bc196c336aa56ddfaf99b0e (patch)
treeea7c185bd2ecaccd34114e10440d818b5f52d8b7 /src/SMAPI/Framework/Content/AssetLoadOperation.cs
parent0e0c1356041915a4668b76da9eacc986953392d2 (diff)
downloadSMAPI-021891ff0ceb6b327bc196c336aa56ddfaf99b0e.tar.gz
SMAPI-021891ff0ceb6b327bc196c336aa56ddfaf99b0e.tar.bz2
SMAPI-021891ff0ceb6b327bc196c336aa56ddfaf99b0e.zip
add load conflict resolution option (#766)
Diffstat (limited to 'src/SMAPI/Framework/Content/AssetLoadOperation.cs')
-rw-r--r--src/SMAPI/Framework/Content/AssetLoadOperation.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Content/AssetLoadOperation.cs b/src/SMAPI/Framework/Content/AssetLoadOperation.cs
index 29bf1518..36baf1aa 100644
--- a/src/SMAPI/Framework/Content/AssetLoadOperation.cs
+++ b/src/SMAPI/Framework/Content/AssetLoadOperation.cs
@@ -14,6 +14,9 @@ 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>Load the initial value for an asset.</summary>
public Func<IAssetInfo, object> GetData { get; }
@@ -23,11 +26,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="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, IModMetadata onBehalfOf, Func<IAssetInfo, object> getData)
+ public AssetLoadOperation(IModMetadata mod, bool allowSkipOnConflict, IModMetadata onBehalfOf, Func<IAssetInfo, object> getData)
{
this.Mod = mod;
+ this.AllowSkipOnConflict = allowSkipOnConflict;
this.OnBehalfOf = onBehalfOf;
this.GetData = getData;
}