fix asset changes not propagating to NPCs in an event
This commit is contained in:
parent
7ca5efbbc5
commit
93475bab7f
|
@ -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.
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue