fix asset propagation for player sprite recolor masks
This commit is contained in:
parent
7a91cf1cd8
commit
eb01aa275b
|
@ -2,6 +2,9 @@
|
|||
|
||||
# Release notes
|
||||
## Upcoming release
|
||||
* For mod authors:
|
||||
* Fixed asset propagation for player sprites not fully updating recolor masks in some cases.
|
||||
|
||||
* For the web UI:
|
||||
* Updated the JSON validator/schema for Content Patcher 1.26.0.
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue