Skip to content

Commit d771c60

Browse files
committed
Merge branch 'develop' into stable
2 parents 8837303 + 59d9a01 commit d771c60

File tree

10 files changed

+25
-9
lines changed

10 files changed

+25
-9
lines changed

build/common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repo. It imports the other MSBuild files as needed.
77
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
88
<PropertyGroup>
99
<!--set general build properties -->
10-
<Version>4.0.0</Version>
10+
<Version>4.0.1</Version>
1111
<Product>SMAPI</Product>
1212
<LangVersion>latest</LangVersion>
1313
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>

docs/release-notes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
[README](README.md)
22

33
# Release notes
4+
# 4.0.1
5+
Released 20 March 2024 for Stardew Valley 1.6.0 or later.
6+
7+
* For players:
8+
* Fixed error in some cases when rewritten mod code removes items from an inventory.
9+
10+
* For the web UI:
11+
* Added CurseForge download link to main page for cases where Nexus is unavailable.
12+
413
## 4.0.0
514
Released 19 March 2024 for Stardew Valley 1.6.0 or later. See [release highlights](https://www.patreon.com/posts/100388693).
615

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"Name": "Console Commands",
33
"Author": "SMAPI",
4-
"Version": "4.0.0",
4+
"Version": "4.0.1",
55
"Description": "Adds SMAPI console commands that let you manipulate the game.",
66
"UniqueID": "SMAPI.ConsoleCommands",
77
"EntryDll": "ConsoleCommands.dll",
8-
"MinimumApiVersion": "4.0.0"
8+
"MinimumApiVersion": "4.0.1"
99
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"Name": "Save Backup",
33
"Author": "SMAPI",
4-
"Version": "4.0.0",
4+
"Version": "4.0.1",
55
"Description": "Automatically backs up all your saves once per day into its folder.",
66
"UniqueID": "SMAPI.SaveBackup",
77
"EntryDll": "SaveBackup.dll",
8-
"MinimumApiVersion": "4.0.0"
8+
"MinimumApiVersion": "4.0.1"
99
}

src/SMAPI.Web/Views/Index/Index.cshtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
<a href="@Model!.StableVersion.DownloadUrl" class="main-cta download">Download SMAPI @Model.StableVersion.Version</a><br />
2828
<div class="dropdown-content">
2929
<a href="https://www.nexusmods.com/stardewvalley/mods/2400"><img src="Content/images/nexus-icon.png" /> Download from Nexus</a>
30-
<a href="@Model.StableVersion.DownloadUrl"><img src="Content/images/direct-download-icon.png" /> Direct download</a>
30+
<a href="https://www.curseforge.com/stardewvalley/utility/smapi"><img src="Content/images/curseforge-icon.png" /> Download from CurseForge</a>
31+
<a href="@Model.StableVersion.DownloadUrl"><img src="Content/images/github-logo.png" /> Download from GitHub</a>
3132
</div>
3233
</div>
3334
<div><a href="https://stardewvalleywiki.com/Modding:Player_Guide" class="secondary-cta">Player guide</a></div>
217 Bytes
Loading
-250 Bytes
Binary file not shown.
1.12 KB
Loading

src/SMAPI/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ internal static class EarlyConstants
4949
internal static int? LogScreenId { get; set; }
5050

5151
/// <summary>SMAPI's current raw semantic version.</summary>
52-
internal static string RawApiVersion = "4.0.0";
52+
internal static string RawApiVersion = "4.0.1";
5353
}
5454

5555
/// <summary>Contains SMAPI's constants and assumptions.</summary>

src/SMAPI/Framework/ModLoading/Rewriters/StardewValley_1_6/Internal/InventoryToNetObjectList.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,14 @@ public override void RemoveAt(int index)
8585
/// <param name="after">The new value.</param>
8686
private void OnInventorySlotChanged(Inventory inventory, int index, Item before, Item after)
8787
{
88-
// don't use `this` to avoid re-editing the inventory
89-
base[index] = after;
88+
try
89+
{
90+
base[index] = after;
91+
}
92+
catch
93+
{
94+
this.RebuildList(); // if the item list is out of sync, rebuild it
95+
}
9096
}
9197

9298
/// <summary>Handle the underlying inventory getting replaced with a new list.</summary>

0 commit comments

Comments
 (0)