diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-07-31 19:22:14 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-07-31 19:22:14 -0400 |
commit | c15d43049a08e73090d77cc150ac48476011a68c (patch) | |
tree | ff61f9d1fe0eae57e240658c286c1a4e5770dd51 /src | |
parent | 80d5672cdb04e8cba40b085b32ffcaf1fea78552 (diff) | |
download | SMAPI-c15d43049a08e73090d77cc150ac48476011a68c.tar.gz SMAPI-c15d43049a08e73090d77cc150ac48476011a68c.tar.bz2 SMAPI-c15d43049a08e73090d77cc150ac48476011a68c.zip |
fix map reload not correctly reloading interior doors
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI.sln.DotSettings | 1 | ||||
-rw-r--r-- | src/SMAPI/Metadata/CoreAssetPropagator.cs | 16 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/SMAPI.sln.DotSettings b/src/SMAPI.sln.DotSettings index 305b1c7d..9a6cad37 100644 --- a/src/SMAPI.sln.DotSettings +++ b/src/SMAPI.sln.DotSettings @@ -49,6 +49,7 @@ <s:Boolean x:Key="/Default/UserDictionary/Words/=Netcode/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=overworld/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Pastebin/@EntryIndexedValue">True</s:Boolean> + <s:Boolean x:Key="/Default/UserDictionary/Words/=pathfinding/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Pathoschild/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=premultiplied/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=premultiply/@EntryIndexedValue">True</s:Boolean> diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 9273864e..a8686ca4 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -5,7 +5,6 @@ using System.IO; using System.Linq; using Microsoft.Xna.Framework.Graphics; using Netcode; -using StardewModdingAPI.Framework; using StardewModdingAPI.Framework.ContentManagers; using StardewModdingAPI.Framework.Reflection; using StardewModdingAPI.Internal; @@ -939,16 +938,17 @@ namespace StardewModdingAPI.Metadata // 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); - // update interior doors + // reload interior doors location.interiorDoors.Clear(); - foreach (var entry in new InteriorDoorDictionary(location)) - location.interiorDoors.Add(entry); + location.interiorDoors.ResetSharedState(); // load doors from map properties + location.interiorDoors.ResetLocalState(); // reapply door tiles - // update doors - location.doors.Clear(); + // reapply map changes (after reloading doors so they apply theirs too) + location.MakeMapModifications(force: true); + + // update for changes + location.updateWarps(); location.updateDoors(); } |