propagate asset changes into the save file being loaded

This commit is contained in:
Jesse Plamondon-Willard 2019-01-20 01:01:26 -05:00
parent 782dc6f306
commit 59bc63cab6
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,5 @@
# Release notes
## Upcoming
## Upcoming release
* For players:
* Added mod page link to 'missing dependency' errors for the most common dependencies.
* Improved save backups:
@ -15,6 +14,7 @@
* Fixed broken ModDrop links in the compatibility list.
* For modders:
* Asset changes are now propagated into the parsed save being loaded if applicable.
* Fixed `Constants.SaveFolderName` and `CurrentSavePath` not available during early load stages when using `Specialised.LoadStageChanged` event.
* Fixed `LoadStage.SaveParsed` raised before the parsed save data is available.
* Fixed 'unknown mod' deprecation warnings showing the wrong stack trace.

View File

@ -677,7 +677,13 @@ namespace StardewModdingAPI.Metadata
/// <summary>Get all locations in the game.</summary>
private IEnumerable<GameLocation> GetLocations()
{
foreach (GameLocation location in Game1.locations)
// get available root locations
IEnumerable<GameLocation> rootLocations = Game1.locations;
if (SaveGame.loaded?.locations != null)
rootLocations = rootLocations.Concat(SaveGame.loaded.locations);
// yield root + child locations
foreach (GameLocation location in rootLocations)
{
yield return location;