Merge branch 'develop' into stable
This commit is contained in:
commit
13ed6decf5
|
@ -1,5 +1,5 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyProduct("SMAPI")]
|
[assembly: AssemblyProduct("SMAPI")]
|
||||||
[assembly: AssemblyVersion("2.9.0")]
|
[assembly: AssemblyVersion("2.9.1")]
|
||||||
[assembly: AssemblyFileVersion("2.9.0")]
|
[assembly: AssemblyFileVersion("2.9.1")]
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
# Release notes
|
# Release notes
|
||||||
|
## 2.9.1
|
||||||
|
* For players:
|
||||||
|
* Fixed crash in SMAPI 2.9 when constructing certain buildings.
|
||||||
|
* Fixed error when a map asset is reloaded in rare cases.
|
||||||
|
|
||||||
## 2.9
|
## 2.9
|
||||||
* For players:
|
* For players:
|
||||||
* Added support for ModDrop in update checks and the mod compatibility list.
|
* Added support for ModDrop in update checks and the mod compatibility list.
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"Name": "Console Commands",
|
"Name": "Console Commands",
|
||||||
"Author": "SMAPI",
|
"Author": "SMAPI",
|
||||||
"Version": "2.9.0",
|
"Version": "2.9.1",
|
||||||
"Description": "Adds SMAPI console commands that let you manipulate the game.",
|
"Description": "Adds SMAPI console commands that let you manipulate the game.",
|
||||||
"UniqueID": "SMAPI.ConsoleCommands",
|
"UniqueID": "SMAPI.ConsoleCommands",
|
||||||
"EntryDll": "ConsoleCommands.dll",
|
"EntryDll": "ConsoleCommands.dll",
|
||||||
"MinimumApiVersion": "2.9.0"
|
"MinimumApiVersion": "2.9.1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"Name": "Save Backup",
|
"Name": "Save Backup",
|
||||||
"Author": "SMAPI",
|
"Author": "SMAPI",
|
||||||
"Version": "2.9.0",
|
"Version": "2.9.1",
|
||||||
"Description": "Automatically backs up all your saves once per day into its folder.",
|
"Description": "Automatically backs up all your saves once per day into its folder.",
|
||||||
"UniqueID": "SMAPI.SaveBackup",
|
"UniqueID": "SMAPI.SaveBackup",
|
||||||
"EntryDll": "SaveBackup.dll",
|
"EntryDll": "SaveBackup.dll",
|
||||||
"MinimumApiVersion": "2.9.0"
|
"MinimumApiVersion": "2.9.1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace StardewModdingAPI
|
||||||
** Public
|
** Public
|
||||||
****/
|
****/
|
||||||
/// <summary>SMAPI's current semantic version.</summary>
|
/// <summary>SMAPI's current semantic version.</summary>
|
||||||
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.0");
|
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.1");
|
||||||
|
|
||||||
/// <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.3.32");
|
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.3.32");
|
||||||
|
|
|
@ -62,9 +62,13 @@ namespace StardewModdingAPI.Framework.StateTracking
|
||||||
/// <summary>Update the current value if needed.</summary>
|
/// <summary>Update the current value if needed.</summary>
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
// detect added/removed locations
|
// update watchers
|
||||||
this.LocationListWatcher.Update();
|
this.LocationListWatcher.Update();
|
||||||
this.MineLocationListWatcher.Update();
|
this.MineLocationListWatcher.Update();
|
||||||
|
foreach (LocationTracker watcher in this.Locations)
|
||||||
|
watcher.Update();
|
||||||
|
|
||||||
|
// detect added/removed locations
|
||||||
if (this.LocationListWatcher.IsChanged)
|
if (this.LocationListWatcher.IsChanged)
|
||||||
{
|
{
|
||||||
this.Remove(this.LocationListWatcher.Removed);
|
this.Remove(this.LocationListWatcher.Removed);
|
||||||
|
@ -77,15 +81,11 @@ namespace StardewModdingAPI.Framework.StateTracking
|
||||||
}
|
}
|
||||||
|
|
||||||
// detect building changed
|
// detect building changed
|
||||||
foreach (LocationTracker watcher in this.Locations.ToArray())
|
foreach (LocationTracker watcher in this.Locations.Where(p => p.BuildingsWatcher.IsChanged).ToArray())
|
||||||
{
|
|
||||||
watcher.Update();
|
|
||||||
if (watcher.BuildingsWatcher.IsChanged)
|
|
||||||
{
|
{
|
||||||
this.Remove(watcher.BuildingsWatcher.Removed);
|
this.Remove(watcher.BuildingsWatcher.Removed);
|
||||||
this.Add(watcher.BuildingsWatcher.Added);
|
this.Add(watcher.BuildingsWatcher.Added);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// detect building interiors changed (e.g. construction completed)
|
// detect building interiors changed (e.g. construction completed)
|
||||||
foreach (KeyValuePair<Building, GameLocation> pair in this.BuildingIndoors.Where(p => !object.Equals(p.Key.indoors.Value, p.Value)))
|
foreach (KeyValuePair<Building, GameLocation> pair in this.BuildingIndoors.Where(p => !object.Equals(p.Key.indoors.Value, p.Value)))
|
||||||
|
|
|
@ -92,7 +92,7 @@ namespace StardewModdingAPI.Metadata
|
||||||
bool anyChanged = false;
|
bool anyChanged = false;
|
||||||
foreach (GameLocation location in this.GetLocations())
|
foreach (GameLocation location in this.GetLocations())
|
||||||
{
|
{
|
||||||
if (this.GetNormalisedPath(location.mapPath.Value) == key)
|
if (!string.IsNullOrWhiteSpace(location.mapPath.Value) && this.GetNormalisedPath(location.mapPath.Value) == key)
|
||||||
{
|
{
|
||||||
this.Reflection.GetMethod(location, "reloadMap").Invoke();
|
this.Reflection.GetMethod(location, "reloadMap").Invoke();
|
||||||
this.Reflection.GetMethod(location, "updateWarps").Invoke();
|
this.Reflection.GetMethod(location, "updateWarps").Invoke();
|
||||||
|
|
Loading…
Reference in New Issue