summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/IContentEventHelperForDictionary.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/IContentEventHelperForDictionary.cs')
-rw-r--r--src/StardewModdingAPI/IContentEventHelperForDictionary.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/IContentEventHelperForDictionary.cs b/src/StardewModdingAPI/IContentEventHelperForDictionary.cs
index 1f259920..34796d5c 100644
--- a/src/StardewModdingAPI/IContentEventHelperForDictionary.cs
+++ b/src/StardewModdingAPI/IContentEventHelperForDictionary.cs
@@ -36,6 +36,10 @@ namespace StardewModdingAPI
/// <param name="value">A callback which accepts the current value and returns the new value.</param>
void SetEntry(TKey key, Func<TValue, TValue> value);
+ /// <summary>Dynamically replace values in the dictionary.</summary>
+ /// <param name="replacer">A lambda which takes the current key and value for an entry, and returns the new value.</param>
+ void Replace(Func<TKey, TValue, TValue> replacer);
+
/// <summary>Replace the entire content value with the given value. This is generally not recommended, since it may break compatibility with other mods or different versions of the game.</summary>
/// <param name="value">The new content value.</param>
/// <exception cref="ArgumentNullException">The <paramref name="value"/> is null.</exception>