diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-10 18:51:37 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-10 18:51:37 -0400 |
commit | eb01aa275b272774c48672a2560455d3fb902a4e (patch) | |
tree | ca664fc34d2caab998ff5d8cf73318295d3f233a /src/SMAPI/Metadata/CoreAssetPropagator.cs | |
parent | 7a91cf1cd875bc62072571e1b259a10cbacdaaab (diff) | |
download | SMAPI-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.cs | 4 |
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(); } |