diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-25 22:49:14 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-03-25 22:49:14 -0400 |
commit | 021891ff0ceb6b327bc196c336aa56ddfaf99b0e (patch) | |
tree | ea7c185bd2ecaccd34114e10440d818b5f52d8b7 /src/SMAPI/Framework/Content/AssetLoadOperation.cs | |
parent | 0e0c1356041915a4668b76da9eacc986953392d2 (diff) | |
download | SMAPI-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.cs | 7 |
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; } |