From 67658b8863d4de4aabb6135b67ad1515a74bdfd6 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 20 Aug 2024 22:45:00 -0400 Subject: [PATCH] add asset propagation for Data/ChairTiles --- docs/release-notes.md | 1 + src/SMAPI/Metadata/CoreAssetPropagator.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/docs/release-notes.md b/docs/release-notes.md index 828ef200e..babbff834 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -26,6 +26,7 @@ * Added `DoesAssetExist` methods to `helper.GameContent` and `helper.ModContent` (thanks to KhloeLeclair!). * Added scroll wheel suppression via `helper.Input.SuppressScrollWheel()` (thanks to MercuriusXeno!). * Added `PathUtilities.AnonymizePathForDisplay` to anonymize home paths (thanks to AnotherPillow!). + * Added asset propagation for `Data/ChairTiles`. * Updated dependencies, including [FluentHttpClient](https://github.com/Pathoschild/FluentHttpClient#readme) 4.3.0 → 4.4.0 (see [changes](https://github.com/Pathoschild/FluentHttpClient/blob/develop/RELEASE-NOTES.md#440)) and [Pintail](https://github.com/Nanoray-pl/Pintail) 2.3.0 → 2.4.2 (see [changes](https://github.com/Nanoray-pl/Pintail/blob/master/docs/release-notes.md#242)). * The SMAPI log now includes the assembly version of each loaded mod (thanks to spacechase0!). * Fixed `content.Load` ignoring language override in recent versions. diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index da5c60fa1..19d34a8d8 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -328,6 +328,19 @@ static ISet GetWarpSet(GameLocation location) } return true; + case "data/chairtiles": // GameLocation.loadMap + if (!ignoreWorld) + { + Utility.ForEachLocation(location => + { + if (Context.IsMainPlayer || location.IsTemporary) + this.Reflection.GetField(location, "__mapSeatsDirty").SetValue(true); + + return true; + }); + } + return true; + case "data/characters": // Game1.LoadContent Game1.characterData = DataLoader.Characters(content); if (!ignoreWorld)