From 5129c361c94bd2f4e2e9ef8d39235dc6159a849d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 24 Jan 2021 00:32:26 -0500 Subject: fix interior door errors when reloading maps --- docs/release-notes.md | 5 +++-- src/SMAPI/Metadata/CoreAssetPropagator.cs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 6407ff2d..1e7558ff 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -8,8 +8,9 @@ --> ## Upcoming release -* For the Error Handler mod: - * Disabled 'patched game code' warning. +* For players: + * Fixed _tile contains an invalid TileSheet reference_ errors when mods change certain maps. + * Fixed _patched game code_ issue shown for the bundled ErrorHandler mod. ## 3.9 Released 22 January 2021 for Stardew Valley 1.5.4 or later. See [release highlights](https://www.patreon.com/posts/46553874). diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 4b911a83..f486321e 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -785,6 +785,7 @@ namespace StardewModdingAPI.Metadata private void ReloadMap(GameLocation location) { // reload map + location.interiorDoors.Clear(); // prevent errors when doors try to update tiles which no longer exist location.reloadMap(); location.updateWarps(); location.MakeMapModifications(force: true); -- cgit