update for new map override logic in SDV 1.5.4
Special thanks to the Stardew Valley developers for making the requested changes!
This commit is contained in:
parent
546012da8c
commit
8fd2a6fd3a
|
@ -9,10 +9,12 @@
|
||||||
|
|
||||||
## Upcoming release
|
## Upcoming release
|
||||||
* For players:
|
* For players:
|
||||||
|
* Updated for Stardew Valley 1.5.4.
|
||||||
* Improved game detection in the installer:
|
* Improved game detection in the installer:
|
||||||
* The installer now prefers paths registered by Steam or GOG Galaxy.
|
* The installer now prefers paths registered by Steam or GOG Galaxy.
|
||||||
* The installer now detects default manual GOG installs.
|
* The installer now detects default manual GOG installs.
|
||||||
* Added clearer error when Vortex creates an empty mod folder.
|
* Added clearer error when Vortex creates an empty mod folder.
|
||||||
|
* Fixed various cases where the game's map changes wouldn't be reapplied correctly after mods changed the map.
|
||||||
* Fixed compatibility for very old content packs which still load maps from `.xnb` files. These were broken by map loading changes in Stardew Valley 1.5, but SMAPI now corrects them automatically.
|
* Fixed compatibility for very old content packs which still load maps from `.xnb` files. These were broken by map loading changes in Stardew Valley 1.5, but SMAPI now corrects them automatically.
|
||||||
* Fixed some broken mods incorrectly listed as XNB mods under 'skipped mods'.
|
* Fixed some broken mods incorrectly listed as XNB mods under 'skipped mods'.
|
||||||
|
|
||||||
|
@ -28,7 +30,7 @@
|
||||||
* Network messages through the multiplayer API are no longer sent to players who don't have SMAPI installed. This reduces unneeded network traffic (since they can't read it anyway) and avoids an error in some cases.
|
* Network messages through the multiplayer API are no longer sent to players who don't have SMAPI installed. This reduces unneeded network traffic (since they can't read it anyway) and avoids an error in some cases.
|
||||||
* Improved asset propagation:
|
* Improved asset propagation:
|
||||||
* Added propagation for some `Strings\StringsFromCSFiles` keys (mainly short day names).
|
* Added propagation for some `Strings\StringsFromCSFiles` keys (mainly short day names).
|
||||||
* Fixed some of the game's map changes not reapplied after reloading a map in Stardew Valley 1.5.
|
* Updated map propagation for the changes in Stardew Valley 1.5.4.
|
||||||
* Fixed quarry bridge not fixed if the mountain map was reloaded.
|
* Fixed quarry bridge not fixed if the mountain map was reloaded.
|
||||||
* Added an option to disable rewriting mods for compatibility (thanks to Bpendragon!). This prevents older mods from loading but bypasses a Visual Studio debugger crash.
|
* Added an option to disable rewriting mods for compatibility (thanks to Bpendragon!). This prevents older mods from loading but bypasses a Visual Studio debugger crash.
|
||||||
* Game errors shown in the chatbox are now logged.
|
* Game errors shown in the chatbox are now logged.
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace StardewModdingAPI
|
||||||
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.8.4");
|
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.8.4");
|
||||||
|
|
||||||
/// <summary>The minimum supported version of Stardew Valley.</summary>
|
/// <summary>The minimum supported version of Stardew Valley.</summary>
|
||||||
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.5.3");
|
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.5.4");
|
||||||
|
|
||||||
/// <summary>The maximum supported version of Stardew Valley.</summary>
|
/// <summary>The maximum supported version of Stardew Valley.</summary>
|
||||||
public static ISemanticVersion MaximumGameVersion { get; } = null;
|
public static ISemanticVersion MaximumGameVersion { get; } = null;
|
||||||
|
|
|
@ -784,32 +784,10 @@ namespace StardewModdingAPI.Metadata
|
||||||
/// <param name="location">The location whose map to reload.</param>
|
/// <param name="location">The location whose map to reload.</param>
|
||||||
private void ReloadMap(GameLocation location)
|
private void ReloadMap(GameLocation location)
|
||||||
{
|
{
|
||||||
// reset patch caches
|
// reload map
|
||||||
this.Reflection.GetField<HashSet<string>>(location, "_appliedMapOverrides").GetValue().Clear();
|
|
||||||
switch (location)
|
|
||||||
{
|
|
||||||
case Town _:
|
|
||||||
this.Reflection.GetField<bool>(location, "ccRefurbished").SetValue(false);
|
|
||||||
this.Reflection.GetField<bool>(location, "isShowingDestroyedJoja").SetValue(false);
|
|
||||||
this.Reflection.GetField<bool>(location, "isShowingSpecialOrdersBoard").SetValue(false);
|
|
||||||
this.Reflection.GetField<bool>(location, "isShowingUpgradedPamHouse").SetValue(false);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Beach _:
|
|
||||||
case BeachNightMarket _:
|
|
||||||
case Forest _:
|
|
||||||
this.Reflection.GetField<bool>(location, "hasShownCCUpgrade").SetValue(false);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case Mountain _:
|
|
||||||
this.Reflection.GetField<bool>(location, "bridgeRestored").SetValue(false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// general updates
|
|
||||||
location.reloadMap();
|
location.reloadMap();
|
||||||
location.updateSeasonalTileSheets();
|
|
||||||
location.updateWarps();
|
location.updateWarps();
|
||||||
|
location.MakeMapModifications(force: true);
|
||||||
|
|
||||||
// update interior doors
|
// update interior doors
|
||||||
location.interiorDoors.Clear();
|
location.interiorDoors.Clear();
|
||||||
|
|
Loading…
Reference in New Issue