diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-10-16 17:42:13 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-10-16 17:42:13 -0400 |
commit | 534142009d4b94038150827398b9020edebfe4c0 (patch) | |
tree | 1b7e23d7c4ffd8b7b2389ec7af252a4dfa00520d | |
parent | c87cd3b0028de6e9b4ed0eaacbc73cb83d64cd46 (diff) | |
download | SMAPI-534142009d4b94038150827398b9020edebfe4c0.tar.gz SMAPI-534142009d4b94038150827398b9020edebfe4c0.tar.bz2 SMAPI-534142009d4b94038150827398b9020edebfe4c0.zip |
reapply the game's town map changes in asset propagation
-rw-r--r-- | docs/release-notes.md | 4 | ||||
-rw-r--r-- | src/SMAPI/Metadata/CoreAssetPropagator.cs | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 16afd637..c0a6551d 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,10 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> +## Upcoming release +* For modders: + * Fixed town map asset propagation not reapplying the game's community center, JojaMart, or Pam house changes. + ## 3.7.4 Released 03 October 2020 for Stardew Valley 1.4.1 or later. diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 701bc9f2..307bb11b 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -138,6 +138,14 @@ namespace StardewModdingAPI.Metadata { if (!string.IsNullOrWhiteSpace(location.mapPath.Value) && this.NormalizeAssetNameIgnoringEmpty(location.mapPath.Value) == key) { + // reset town caches + if (location is Town town) + { + this.Reflection.GetField<bool>(town, "ccRefurbished").SetValue(false); + this.Reflection.GetField<bool>(town, "isShowingDestroyedJoja").SetValue(false); + this.Reflection.GetField<bool>(town, "isShowingUpgradedPamHouse").SetValue(false); + } + // general updates location.reloadMap(); location.updateSeasonalTileSheets(); |