diff options
-rw-r--r-- | docs/release-notes.md | 4 | ||||
-rw-r--r-- | src/SMAPI/Metadata/CoreAssetPropagator.cs | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 5a5e24d4..7474cc32 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,6 +1,10 @@ ← [README](README.md) # Release notes +## Upcoming release +* For modders: + * Fixed asset changes not propagating to NPCs in an event (e.g. wedding sprites). + ## 3.4 Released 22 March 2020 for Stardew Valley 1.4.1 or later. diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 8d5ad3ab..83e553ff 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -949,7 +949,14 @@ namespace StardewModdingAPI.Metadata /// <summary>Get all NPCs in the game (excluding farm animals).</summary> private IEnumerable<NPC> GetCharacters() { - return this.GetLocations().SelectMany(p => p.characters); + foreach (NPC character in this.GetLocations().SelectMany(p => p.characters)) + yield return character; + + if (Game1.CurrentEvent?.actors != null) + { + foreach (NPC character in Game1.CurrentEvent.actors) + yield return character; + } } /// <summary>Get all farm animals in the game.</summary> |