Skip to content

Commit 9746b01

Browse files
committed
update fridge position after patching a farmhouse map
1 parent 2c62785 commit 9746b01

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* For players:
66
* Minor performance optimizations.
77
* Fixed the Linux/macOS installer not saving the color scheme correctly in 4.5.0+.
8+
* Fixed farmhouse fridge when a mod dynamically adds it in later.
89
* Fixed typo in config UI text (thanks to QuentiumYT!).
910
* Improved translations. Thanks to dekthaiinchina (updated Thai), dewanggatrustha (updated Indonesian), QuentiumYT (updated French), Timur13240
1011
(updated Russian), and vlcoo (updated Spanish)!

src/SMAPI/Metadata/CoreAssetPropagator.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,18 @@ private void UpdateMap(LocationInfo locationInfo)
705705
this.Reflection.GetField<bool>(location, "displayingSpouseRoom").SetValue(false);
706706
location.MakeMapModifications(force: true);
707707

708+
// update fridge position
709+
switch (location)
710+
{
711+
case FarmHouse farmhouse:
712+
farmhouse.fridgePosition = farmhouse.GetFridgePositionFromMap() ?? Point.Zero;
713+
break;
714+
715+
case IslandFarmHouse farmhouse:
716+
farmhouse.fridgePosition = farmhouse.GetFridgePositionFromMap() ?? Point.Zero;
717+
break;
718+
}
719+
708720
// reset player position
709721
// The game may move the player as part of the map changes, even if they're not in that
710722
// location. That's not needed in this case, and it can have weird effects like players

0 commit comments

Comments
 (0)