From 021891ff0ceb6b327bc196c336aa56ddfaf99b0e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 25 Mar 2022 22:49:14 -0400 Subject: add load conflict resolution option (#766) --- src/SMAPI/Framework/Content/AssetLoadOperation.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/Content') 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 /// 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; } + /// Load the initial value for an asset. public Func GetData { get; } @@ -23,11 +26,13 @@ namespace StardewModdingAPI.Framework.Content *********/ /// Construct an instance. /// The mod applying the edit. + /// Whether to allow skipping this operation to resolve a load conflict. /// The content pack on whose behalf the asset is being loaded, if any. /// Load the initial value for an asset. - public AssetLoadOperation(IModMetadata mod, IModMetadata onBehalfOf, Func getData) + public AssetLoadOperation(IModMetadata mod, bool allowSkipOnConflict, IModMetadata onBehalfOf, Func getData) { this.Mod = mod; + this.AllowSkipOnConflict = allowSkipOnConflict; this.OnBehalfOf = onBehalfOf; this.GetData = getData; } -- cgit