summaryrefslogtreecommitdiff
path: root/src/SMAPI/Metadata/CoreAssetPropagator.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-10 18:51:37 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-10 18:51:37 -0400
commiteb01aa275b272774c48672a2560455d3fb902a4e (patch)
treeca664fc34d2caab998ff5d8cf73318295d3f233a /src/SMAPI/Metadata/CoreAssetPropagator.cs
parent7a91cf1cd875bc62072571e1b259a10cbacdaaab (diff)
downloadSMAPI-eb01aa275b272774c48672a2560455d3fb902a4e.tar.gz
SMAPI-eb01aa275b272774c48672a2560455d3fb902a4e.tar.bz2
SMAPI-eb01aa275b272774c48672a2560455d3fb902a4e.zip
fix asset propagation for player sprite recolor masks
Diffstat (limited to 'src/SMAPI/Metadata/CoreAssetPropagator.cs')
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs
index 12b73515..e014f9a9 100644
--- a/src/SMAPI/Metadata/CoreAssetPropagator.cs
+++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs
@@ -1017,7 +1017,9 @@ namespace StardewModdingAPI.Metadata
foreach (Farmer player in players)
{
- this.Reflection.GetField<Dictionary<string, Dictionary<int, List<int>>>?>(typeof(FarmerRenderer), "_recolorOffsets").GetValue()?.Remove(player.getTexture());
+ var recolorOffsets = this.Reflection.GetField<Dictionary<string, Dictionary<int, List<int>>>?>(typeof(FarmerRenderer), "_recolorOffsets").GetValue();
+ recolorOffsets?.Clear();
+
player.FarmerRenderer.MarkSpriteDirty();
}