Skip to content

Commit 74e20ea

Browse files
committed
Merge branch 'develop' into stable
2 parents a284d86 + 02f5324 commit 74e20ea

32 files changed

+538
-365
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ _ReSharper*/
3232
appsettings.Development.json
3333

3434
# Azure generated files
35-
src/SMAPI.Web/Properties/PublishProfiles/*.pubxml
36-
src/SMAPI.Web/Properties/ServiceDependencies/* - Web Deploy/
35+
src/SMAPI.Web/Properties/PublishProfiles
36+
src/SMAPI.Web/Properties/ServiceDependencies
3737

3838
# macOS
3939
.DS_Store

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.7</Version>
10+
<Version>4.0.8</Version>
1111
<Product>SMAPI</Product>
1212
<LangVersion>latest</LangVersion>
1313
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>

docs/release-notes.md

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

33
# Release notes
4+
## 4.0.8
5+
Released 21 April 2024 for Stardew Valley 1.6.4 or later.
6+
7+
* For players:
8+
* Added option to disable Harmony fix for players with certain crashes.
9+
* Fixed crash for non-English players in split-screen mode when mods translate some vanilla assets.
10+
* SMAPI no longer rewrites mods which use Harmony 1.x, to help reduce Harmony crashes.
11+
_This should affect very few mods that still work otherwise, and any Harmony mod updated after July 2021 should be unaffected._
12+
* Updated mod compatibility list to prevent common crashes.
13+
14+
* For the update check server:
15+
* Rewrote update checks for mods on Nexus Mods to use a new Nexus API endpoint.
16+
_This should result in much faster update checks for Nexus, and less chance of update-check errors when the Nexus servers are under heavy load._
17+
418
## 4.0.7
519
Released 18 April 2024 for Stardew Valley 1.6.4 or later.
620

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.7",
4+
"Version": "4.0.8",
55
"Description": "Adds SMAPI console commands that let you manipulate the game.",
66
"UniqueID": "SMAPI.ConsoleCommands",
77
"EntryDll": "ConsoleCommands.dll",
8-
"MinimumApiVersion": "4.0.7"
8+
"MinimumApiVersion": "4.0.8"
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.7",
4+
"Version": "4.0.8",
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.7"
8+
"MinimumApiVersion": "4.0.8"
99
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using StardewModdingAPI.Toolkit.Framework.Clients.NexusExport.ResponseModels;
4+
5+
namespace StardewModdingAPI.Toolkit.Framework.Clients.NexusExport
6+
{
7+
/// <summary>An HTTP client for fetching the mod export from the Nexus Mods export API.</summary>
8+
public interface INexusExportApiClient : IDisposable
9+
{
10+
/// <summary>Fetch the latest export file from the Nexus Mods export API.</summary>
11+
public Task<NexusFullExport> FetchExportAsync();
12+
}
13+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using System.Threading.Tasks;
2+
using Pathoschild.Http.Client;
3+
using StardewModdingAPI.Toolkit.Framework.Clients.NexusExport.ResponseModels;
4+
5+
namespace StardewModdingAPI.Toolkit.Framework.Clients.NexusExport
6+
{
7+
/// <inheritdoc cref="INexusExportApiClient" />
8+
public class NexusExportApiClient : INexusExportApiClient
9+
{
10+
/*********
11+
** Fields
12+
*********/
13+
/// <summary>The underlying HTTP client.</summary>
14+
private readonly IClient Client;
15+
16+
17+
/*********
18+
** Public methods
19+
*********/
20+
/// <summary>Construct an instance.</summary>
21+
/// <param name="userAgent">The user agent for the Nexus export API.</param>
22+
/// <param name="baseUrl">The base URL for the Nexus export API.</param>
23+
public NexusExportApiClient(string userAgent, string baseUrl)
24+
{
25+
this.Client = new FluentClient(baseUrl).SetUserAgent(userAgent);
26+
}
27+
28+
/// <inheritdoc />
29+
public async Task<NexusFullExport> FetchExportAsync()
30+
{
31+
return await this.Client
32+
.GetAsync("")
33+
.As<NexusFullExport>();
34+
}
35+
36+
/// <inheritdoc />
37+
public void Dispose()
38+
{
39+
this.Client.Dispose();
40+
}
41+
}
42+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
using System.Collections.Generic;
2+
using System.Diagnostics.CodeAnalysis;
3+
using Newtonsoft.Json;
4+
5+
namespace StardewModdingAPI.Toolkit.Framework.Clients.NexusExport.ResponseModels
6+
{
7+
/// <summary>The metadata for an uploaded file for a mod from the Nexus Mods export API.</summary>
8+
public class NexusFileExport
9+
{
10+
/// <summary>The unique internal file identifier.</summary>
11+
public long Uid { get; set; }
12+
13+
/// <summary>The file's display name.</summary>
14+
public string? Name { get; set; }
15+
16+
/// <summary>The file's display description.</summary>
17+
public string? Description { get; set; }
18+
19+
/// <summary>The file name that will be downloaded.</summary>
20+
[JsonProperty("uri")]
21+
public string? FileName { get; set; }
22+
23+
/// <summary>The file's semantic version.</summary>
24+
public string? Version { get; set; }
25+
26+
/// <summary>The file category ID.</summary>
27+
[JsonProperty("category_id")]
28+
public uint CategoryId { get; set; }
29+
30+
/// <summary>Whether this is the main Vortex file.</summary>
31+
public bool Primary { get; set; }
32+
33+
/// <summary>The file's size in bytes.</summary>
34+
[JsonProperty("size_in_byes")]
35+
public long? SizeInBytes { get; set; }
36+
37+
/// <summary>When the file was uploaded.</summary>
38+
[JsonProperty("uploaded_at")]
39+
public long UploadedAt { get; set; }
40+
41+
/// <summary>The extra fields returned by the export API, if any.</summary>
42+
[JsonExtensionData]
43+
[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "Used to track any new data provided by the API.")]
44+
public Dictionary<string, object>? OtherFields;
45+
}
46+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Newtonsoft.Json;
4+
5+
namespace StardewModdingAPI.Toolkit.Framework.Clients.NexusExport.ResponseModels
6+
{
7+
/// <summary>The metadata for all Stardew Valley from the Nexus Mods export API.</summary>
8+
public class NexusFullExport
9+
{
10+
/// <summary>The mod data indexed by public mod ID.</summary>
11+
public Dictionary<uint, NexusModExport> Data { get; set; } = new();
12+
13+
/// <summary>When this export was last updated.</summary>
14+
[JsonProperty("last_updated")]
15+
public DateTimeOffset LastUpdated { get; set; }
16+
}
17+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
using System.Collections.Generic;
2+
using System.Diagnostics.CodeAnalysis;
3+
using Newtonsoft.Json;
4+
5+
namespace StardewModdingAPI.Toolkit.Framework.Clients.NexusExport.ResponseModels
6+
{
7+
/// <summary>The metadata for a mod from the Nexus Mods export API.</summary>
8+
public class NexusModExport
9+
{
10+
/// <summary>The unique internal mod identifier (not the public mod ID).</summary>
11+
public long Uid { get; set; }
12+
13+
/// <summary>The mod's display name.</summary>
14+
public string? Name { get; set; }
15+
16+
/// <summary>The author display name set for the mod.</summary>
17+
public string? Author { get; set; }
18+
19+
/// <summary>The username for the user who uploaded the mod.</summary>
20+
public string? Uploader { get; set; }
21+
22+
/// <summary>The ID for the user who uploaded the mod.</summary>
23+
[JsonProperty("uploader_id")]
24+
public int UploaderId { get; set; }
25+
26+
/// <summary>The mod's semantic version.</summary>
27+
public string? Version { get; set; }
28+
29+
/// <summary>The category ID.</summary>
30+
[JsonProperty("category_id")]
31+
public int CategoryId { get; set; }
32+
33+
/// <summary>Whether the mod is published by the author.</summary>
34+
public bool Published { get; set; }
35+
36+
/// <summary>Whether the mod is hidden by moderators.</summary>
37+
public bool Moderated { get; set; }
38+
39+
/// <summary>Whether the mod page is visible to users.</summary>
40+
[JsonProperty("allow_view")]
41+
public bool AllowView { get; set; }
42+
43+
/// <summary>Whether the mod is marked as containing adult content.</summary>
44+
public bool Adult { get; set; }
45+
46+
/// <summary>The files uploaded for the mod.</summary>
47+
public Dictionary<uint, NexusFileExport> Files { get; set; } = new();
48+
49+
/// <summary>The extra fields returned by the export API, if any.</summary>
50+
[JsonExtensionData]
51+
[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "Used to track any new data provided by the API.")]
52+
public Dictionary<string, object>? OtherFields;
53+
}
54+
}

0 commit comments

Comments
 (0)