From d96cec88e461806c4676c9280455da19f5c7af24 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 10 Mar 2022 23:24:01 -0500 Subject: fix set_farm_type not updating warps --- docs/release-notes.md | 1 + .../Framework/Commands/Player/SetFarmTypeCommand.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/release-notes.md b/docs/release-notes.md index 3030cc5d..2598dad5 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -5,6 +5,7 @@ * For players: * Improved translations. Thanks to ChulkyBow (updated Ukrainian)! * Fixed `player_add` console command's handling of Journal Scraps and Secret Notes. + * Fixed `set_farm_type` console command not updating warps if they moved. * Improved [command-line arguments](technical/smapi.md#command-line-arguments) on Linux/macOS: * Added `--use-current-shell` to avoid opening a separate terminal window. * Fixed `--no-terminal` still opening a terminal window, even if nothing is logged to it (thanks to Ryhon0!). diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetFarmTypeCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetFarmTypeCommand.cs index 6b3b27cd..6fb399ae 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetFarmTypeCommand.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetFarmTypeCommand.cs @@ -131,6 +131,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player Farm farm = Game1.getFarm(); farm.mapPath.Value = $@"Maps\{Farm.getMapNameFromTypeInt(Game1.whichFarm)}"; farm.reloadMap(); + farm.updateWarps(); // clear spouse area cache to avoid errors FieldInfo cacheField = farm.GetType().GetField("_baseSpouseAreaTiles", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); -- cgit