From daa6ad3b95b3e8bec96629dc06fe25f330b99e95 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 17 Sep 2020 23:50:30 +0200 Subject: [PATCH 01/14] Allow for negative values in Rectangle --- src/SMAPI/Framework/Serialization/RectangleConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMAPI/Framework/Serialization/RectangleConverter.cs b/src/SMAPI/Framework/Serialization/RectangleConverter.cs index a5780d8a0..8f7318b37 100644 --- a/src/SMAPI/Framework/Serialization/RectangleConverter.cs +++ b/src/SMAPI/Framework/Serialization/RectangleConverter.cs @@ -37,7 +37,7 @@ protected override Rectangle ReadString(string str, string path) if (string.IsNullOrWhiteSpace(str)) return Rectangle.Empty; - var match = Regex.Match(str, @"^\{X:(?\d+) Y:(?\d+) Width:(?\d+) Height:(?\d+)\}$", RegexOptions.IgnoreCase); + var match = Regex.Match(str, @"^\{X:(?-?\d+) Y:(?-?\d+) Width:(?-?\d+) Height:(?-?\d+)\}$", RegexOptions.IgnoreCase); if (!match.Success) throw new SParseException($"Can't parse {nameof(Rectangle)} from invalid value '{str}' (path: {path})."); From 01c2824b5cd26dfa0b209e1b0c69d1cf01b5b47d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 18 Sep 2020 21:16:22 -0400 Subject: [PATCH 02/14] update JSON schema for Content Patcher 1.18 --- docs/release-notes.md | 4 ++++ src/SMAPI.Web/wwwroot/schemas/content-patcher.json | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 868175464..d9b9ca09a 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,10 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> +## Upcoming release +* For the web UI: + * Updated the JSON validator/schema for Content Patcher 1.18. + ## 3.7.3 Released 16 September 2020 for Stardew Valley 1.4.1 or later. diff --git a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json index 3fd24e4e8..2e7134cd7 100644 --- a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json +++ b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json @@ -11,7 +11,7 @@ "title": "Format version", "description": "The format version. You should always use the latest version to enable the latest features and avoid obsolete behavior.", "type": "string", - "const": "1.17.0", + "const": "1.18.0", "@errorMessages": { "const": "Incorrect value '@value'. This should be set to the latest format version, currently '1.17.0'." } @@ -43,6 +43,11 @@ "description": "The default values when the field is missing. Can contain multiple comma-delimited values if AllowMultiple is true. If omitted, blank fields are left blank.", "type": "string" }, + "Description": { + "title": "Description", + "description": "An optional explanation of the config field for players, shown in UIs like Generic Mod Config Menu.", + "type": "string" + }, "additionalProperties": false }, @@ -383,7 +388,6 @@ "enum": [ "Action", "Enabled", - "FromFile", "LogName", "Target", "Update", @@ -391,7 +395,8 @@ "Entries", "Fields", - "MoveEntries" + "MoveEntries", + "TextOperations" ] } } @@ -427,6 +432,7 @@ "FromArea", "MapProperties", "MapTiles", + "TextOperations", "ToArea" ] } From e0b3f97f9e7fee838d53f020ec4ddc29a2d194e1 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 19 Sep 2020 12:46:32 -0400 Subject: [PATCH 03/14] fix asset propagation for Data\MoviesReactions --- docs/release-notes.md | 3 +++ src/SMAPI/Metadata/CoreAssetPropagator.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index d9b9ca09a..24f9bbddb 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -8,6 +8,9 @@ --> ## Upcoming release +* For modders: + * Fixed asset propagation for `Data\MoviesReactions`. + * For the web UI: * Updated the JSON validator/schema for Content Patcher 1.18. diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 71199d59e..701bc9f23 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -263,7 +263,7 @@ private bool PropagateOther(LocalizedContentManager content, string key, Type ty case "data\\farmanimals": // FarmAnimal constructor return this.ReloadFarmAnimalData(); - case "data\\moviereactions": // MovieTheater.GetMovieReactions + case "data\\moviesreactions": // MovieTheater.GetMovieReactions this.Reflection .GetField>(typeof(MovieTheater), "_genericReactions") .SetValue(content.Load>(key)); From d5c98bf2df2baff4ed048c35d903424b8e1ce2e2 Mon Sep 17 00:00:00 2001 From: Marcos Miller Dantas Date: Mon, 21 Sep 2020 10:04:21 -0300 Subject: [PATCH 04/14] Performance tuning on an old laptop i've noticed that the thread was consuming alot of resources. --- src/SMAPI/Framework/Logging/LogManager.cs | 14 +++++++------- src/SMAPI/Framework/SCore.cs | 7 ++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/SMAPI/Framework/Logging/LogManager.cs b/src/SMAPI/Framework/Logging/LogManager.cs index 094dd7497..d83a5c0b7 100644 --- a/src/SMAPI/Framework/Logging/LogManager.cs +++ b/src/SMAPI/Framework/Logging/LogManager.cs @@ -138,15 +138,15 @@ public void RunConsoleInputLoop(CommandManager commandManager, Action reloadTran Thread inputThread = new Thread(() => { while (true) - { + { // get input - string input = Console.ReadLine(); - if (string.IsNullOrWhiteSpace(input)) - continue; + string input = Console.ReadLine(); + if (string.IsNullOrWhiteSpace(input)) + continue; - // handle command - this.Monitor.LogUserInput(input); - handleInput(input); + // handle command + this.Monitor.LogUserInput(input); + handleInput(input); } }); inputThread.Start(); diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index e64c2801f..e2a9463b9 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -278,15 +278,16 @@ public void RunInteractively() ); // add exit handler - new Thread(() => + this.CancellationToken.Token.Register(() => { - this.CancellationToken.Token.WaitHandle.WaitOne(); if (this.IsGameRunning) { + this.inputThread.Abort(); this.LogManager.WriteCrashLog(); this.Game.Exit(); } - }).Start(); + }); + // set window titles this.SetWindowTitles( From b5573a93313fae18cafb2a78765ede168f19f634 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 22 Sep 2020 18:27:08 -0400 Subject: [PATCH 05/14] update release notes, format code --- docs/release-notes.md | 3 +++ src/SMAPI/Framework/Logging/LogManager.cs | 14 +++++++------- src/SMAPI/Framework/SCore.cs | 1 - 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 24f9bbddb..d02b96bcb 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -8,6 +8,9 @@ --> ## Upcoming release +* For players: + * Improved performance of exit handler (thanks to millerscout!). + * For modders: * Fixed asset propagation for `Data\MoviesReactions`. diff --git a/src/SMAPI/Framework/Logging/LogManager.cs b/src/SMAPI/Framework/Logging/LogManager.cs index d83a5c0b7..094dd7497 100644 --- a/src/SMAPI/Framework/Logging/LogManager.cs +++ b/src/SMAPI/Framework/Logging/LogManager.cs @@ -138,15 +138,15 @@ public void RunConsoleInputLoop(CommandManager commandManager, Action reloadTran Thread inputThread = new Thread(() => { while (true) - { + { // get input - string input = Console.ReadLine(); - if (string.IsNullOrWhiteSpace(input)) - continue; + string input = Console.ReadLine(); + if (string.IsNullOrWhiteSpace(input)) + continue; - // handle command - this.Monitor.LogUserInput(input); - handleInput(input); + // handle command + this.Monitor.LogUserInput(input); + handleInput(input); } }); inputThread.Start(); diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index e2a9463b9..776e32dad 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -288,7 +288,6 @@ public void RunInteractively() } }); - // set window titles this.SetWindowTitles( game: $"Stardew Valley {Constants.GameVersion} - running SMAPI {Constants.ApiVersion}", From 05727acb9b6a90fd4911e74800fe5ea0ea02050d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 22 Sep 2020 18:40:07 -0400 Subject: [PATCH 06/14] fix reference to nonexistent field It's not really needed anyway, since managed threads will end when SMAPI exits. --- src/SMAPI/Framework/SCore.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 776e32dad..f07e41f0a 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -282,7 +282,6 @@ public void RunInteractively() { if (this.IsGameRunning) { - this.inputThread.Abort(); this.LogManager.WriteCrashLog(); this.Game.Exit(); } From 819b796e8dd264fbcea72ea065944a206743693e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 23 Sep 2020 20:32:21 -0400 Subject: [PATCH 07/14] streamline mod build config package creation --- build/prepare-nuget-package.targets | 23 ----------- docs/release-notes.md | 3 ++ docs/technical/mod-package.md | 16 +++----- .../SMAPI.ModBuildConfig.csproj | 39 +++++++++++++++---- src/SMAPI.ModBuildConfig/package.nuspec | 27 ------------- src/SMAPI.sln | 2 - 6 files changed, 39 insertions(+), 71 deletions(-) delete mode 100644 build/prepare-nuget-package.targets delete mode 100644 src/SMAPI.ModBuildConfig/package.nuspec diff --git a/build/prepare-nuget-package.targets b/build/prepare-nuget-package.targets deleted file mode 100644 index 0682d9ff6..000000000 --- a/build/prepare-nuget-package.targets +++ /dev/null @@ -1,23 +0,0 @@ - - - - - $(SolutionDir)\..\bin\Pathoschild.Stardew.ModBuildConfig - - - - - - - - - - - - - diff --git a/docs/release-notes.md b/docs/release-notes.md index d02b96bcb..01bcbad6f 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -17,6 +17,9 @@ * For the web UI: * Updated the JSON validator/schema for Content Patcher 1.18. +* For SMAPI developers: + * Reworked how the _mod build config_ package is released, added auto-generated package on build. + ## 3.7.3 Released 16 September 2020 for Stardew Valley 1.4.1 or later. diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index a1457405f..c338e1043 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -343,19 +343,13 @@ project | purpose `StardewModdingAPI.ModBuildConfig.Analyzer` | Adds C# analyzers which show code warnings in Visual Studio. `StardewModdingAPI.ModBuildConfig.Analyzer.Tests` | Unit tests for the C# analyzers. -To prepare a build of the NuGet package: -1. Install the [NuGet CLI](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#nugetexe-cli). -1. Change the version and release notes in `package.nuspec`. -2. Rebuild the solution in _Release_ mode. -3. Open a terminal in the `bin/Pathoschild.Stardew.ModBuildConfig` folder and run this command: - ```bash - nuget.exe pack - ``` - -That will create a `Pathoschild.Stardew.ModBuildConfig-.nupkg` file in the same directory -which can be uploaded to NuGet or referenced directly. +The NuGet package is generated automatically in `StardewModdingAPI.ModBuildConfig`'s `bin` folder +when you compile it. ## Release notes +## Upcoming release +* Reworked and streamlined how the package is compiled. + ### 3.2.1 Released 11 September 2020. diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index 605096d9c..ec810dd19 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -1,10 +1,27 @@  + StardewModdingAPI.ModBuildConfig - 3.2.1 net45 x86 - false + latest + true + + + Pathoschild.Stardew.ModBuildConfig + Build package for SMAPI mods + 3.2.1 + Pathoschild + Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 3.0 or later. + MIT + images/icon.png + https://smapi.io/package/readme + + 3.2.1: + - Added more detailed logging. + - Fixed "path's format is not supported" error when using default Mods path in 3.2. + + false @@ -16,16 +33,22 @@ - + - + - + + + + + + + + + + - - - diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec deleted file mode 100644 index 05aed8f9a..000000000 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - Pathoschild.Stardew.ModBuildConfig - 3.2.1 - Build package for SMAPI mods - Pathoschild - Pathoschild - false - MIT - - https://smapi.io/package/readme - images\icon.png - https://raw.githubusercontent.com/Pathoschild/SMAPI/develop/src/SMAPI.ModBuildConfig/assets/nuget-icon.png - Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 3.0 or later. - - 3.2.1: - - Added more detailed logging. - - Fixed "path's format is not supported" error when using default Mods path in 3.2. - - - - - - - - diff --git a/src/SMAPI.sln b/src/SMAPI.sln index 92b0cd2cd..aaf4d374b 100644 --- a/src/SMAPI.sln +++ b/src/SMAPI.sln @@ -29,7 +29,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{09CF91E5 ..\build\common.targets = ..\build\common.targets ..\build\find-game-folder.targets = ..\build\find-game-folder.targets ..\build\prepare-install-package.targets = ..\build\prepare-install-package.targets - ..\build\prepare-nuget-package.targets = ..\build\prepare-nuget-package.targets EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{EB35A917-67B9-4EFA-8DFC-4FB49B3949BB}" @@ -81,7 +80,6 @@ Global GlobalSection(SharedMSBuildProjectFiles) = preSolution SMAPI.Internal\SMAPI.Internal.projitems*{0634ea4c-3b8f-42db-aea6-ca9e4ef6e92f}*SharedItemsImports = 5 SMAPI.Internal\SMAPI.Internal.projitems*{0a9bb24f-15ff-4c26-b1a2-81f7ae316518}*SharedItemsImports = 5 - SMAPI.Internal\SMAPI.Internal.projitems*{1b3821e6-d030-402c-b3a1-7ca45c2800ea}*SharedItemsImports = 5 SMAPI.Internal\SMAPI.Internal.projitems*{80efd92f-728f-41e0-8a5b-9f6f49a91899}*SharedItemsImports = 5 SMAPI.Internal\SMAPI.Internal.projitems*{85208f8d-6fd1-4531-be05-7142490f59fe}*SharedItemsImports = 13 SMAPI.Internal\SMAPI.Internal.projitems*{cd53ad6f-97f4-4872-a212-50c2a0fd3601}*SharedItemsImports = 5 From 947d9c87e051a35fcaa49ba5313ceadc301a0f22 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 23 Sep 2020 20:33:38 -0400 Subject: [PATCH 08/14] add SMAPI-ModTranslationClassBuilder files to mod build config ignore list --- docs/technical/mod-package.md | 1 + src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index c338e1043..11b7143c0 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -349,6 +349,7 @@ when you compile it. ## Release notes ## Upcoming release * Reworked and streamlined how the package is compiled. +* Added [SMAPI-ModTranslationClassBuilder](https://github.com/Pathoschild/SMAPI-ModTranslationClassBuilder) files to the ignore list. ### 3.2.1 Released 11 September 2020. diff --git a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs index 636c36693..6dd595e5c 100644 --- a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs +++ b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs @@ -164,6 +164,11 @@ private bool ShouldIgnore(FileInfo file, string relativePath, Regex[] ignoreFile || this.EqualsInvariant(file.Name, "Newtonsoft.Json.pdb") || this.EqualsInvariant(file.Name, "Newtonsoft.Json.xml") + // mod translation class builder (not used at runtime) + || this.EqualsInvariant(file.Name, "Pathoschild.Stardew.ModTranslationClassBuilder.dll") + || this.EqualsInvariant(file.Name, "Pathoschild.Stardew.ModTranslationClassBuilder.pdb") + || this.EqualsInvariant(file.Name, "Pathoschild.Stardew.ModTranslationClassBuilder.xml") + // code analysis files || file.Name.EndsWith(".CodeAnalysisLog.xml", StringComparison.OrdinalIgnoreCase) || file.Name.EndsWith(".lastcodeanalysissucceeded", StringComparison.OrdinalIgnoreCase) From 9edd3b901a110ef1fddcbcc05730da1b1cadd680 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 23 Sep 2020 20:38:01 -0400 Subject: [PATCH 09/14] prepare mod build package for release --- docs/technical/mod-package.md | 4 +++- src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/technical/mod-package.md b/docs/technical/mod-package.md index 11b7143c0..f7475e375 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -347,7 +347,9 @@ The NuGet package is generated automatically in `StardewModdingAPI.ModBuildConfi when you compile it. ## Release notes -## Upcoming release +## 3.2.2 +Released 23 September 2020. + * Reworked and streamlined how the package is compiled. * Added [SMAPI-ModTranslationClassBuilder](https://github.com/Pathoschild/SMAPI-ModTranslationClassBuilder) files to the ignore list. diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index ec810dd19..1813f58b1 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -10,16 +10,15 @@ Pathoschild.Stardew.ModBuildConfig Build package for SMAPI mods - 3.2.1 + 3.2.2 Pathoschild Automates the build configuration for crossplatform Stardew Valley SMAPI mods. For SMAPI 3.0 or later. MIT images/icon.png https://smapi.io/package/readme - 3.2.1: - - Added more detailed logging. - - Fixed "path's format is not supported" error when using default Mods path in 3.2. + - Reworked and streamlined how the package is compiled. + - Added SMAPI-ModTranslationClassBuilder files to the ignore list. false From 4eff88fe73760ef89423de76cae80ffeee235240 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 24 Sep 2020 19:41:36 -0400 Subject: [PATCH 10/14] fix error in case-insensitive content pack code when mod passes in a null path --- docs/release-notes.md | 1 + src/SMAPI/Framework/ContentPack.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 01bcbad6f..a125c92a2 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -13,6 +13,7 @@ * For modders: * Fixed asset propagation for `Data\MoviesReactions`. + * Fixed error in the case-insensitive content pack logic when a mod reads a null file path. (It now correctly logs an error in the code that handles the path instead.) * For the web UI: * Updated the JSON validator/schema for Content Patcher 1.18. diff --git a/src/SMAPI/Framework/ContentPack.cs b/src/SMAPI/Framework/ContentPack.cs index 161fdbe4f..a6835dbec 100644 --- a/src/SMAPI/Framework/ContentPack.cs +++ b/src/SMAPI/Framework/ContentPack.cs @@ -119,7 +119,7 @@ private string GetCaseInsensitiveRelativePath(string relativePath) if (!PathUtilities.IsSafeRelativePath(relativePath)) throw new InvalidOperationException($"You must call {nameof(IContentPack)} methods with a relative path."); - return this.RelativePaths.TryGetValue(relativePath, out string caseInsensitivePath) + return !string.IsNullOrWhiteSpace(relativePath) && this.RelativePaths.TryGetValue(relativePath, out string caseInsensitivePath) ? caseInsensitivePath : relativePath; } From 5c733af7478db7c4a5b578512b4236e021b2abc9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 27 Sep 2020 13:23:48 -0400 Subject: [PATCH 11/14] fix update-check error for Chucklefish mods due to site change --- docs/release-notes.md | 7 ++++--- .../Framework/Clients/Chucklefish/ChucklefishClient.cs | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index a125c92a2..3ba343425 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -9,17 +9,18 @@ ## Upcoming release * For players: - * Improved performance of exit handler (thanks to millerscout!). + * Improved performance on some older computers (thanks to millerscout!). + * Fixed update alerts for Chucklefish forum mods broken by a recent site change. * For modders: * Fixed asset propagation for `Data\MoviesReactions`. - * Fixed error in the case-insensitive content pack logic when a mod reads a null file path. (It now correctly logs an error in the code that handles the path instead.) + * Fixed error in content pack path handling when you pass a null path. * For the web UI: * Updated the JSON validator/schema for Content Patcher 1.18. * For SMAPI developers: - * Reworked how the _mod build config_ package is released, added auto-generated package on build. + * Simplified preparing a mod build config package release. ## 3.7.3 Released 16 September 2020 for Stardew Valley 1.4.1 or later. diff --git a/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs b/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs index ca156da46..b8b058785 100644 --- a/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs +++ b/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs @@ -67,10 +67,10 @@ public async Task GetModData(string id) // extract mod info string url = this.GetModUrl(parsedId); - string name = doc.DocumentNode.SelectSingleNode("//meta[@name='twitter:title']").Attributes["content"].Value; - if (name.StartsWith("[SMAPI] ")) - name = name.Substring("[SMAPI] ".Length); string version = doc.DocumentNode.SelectSingleNode("//h1/span")?.InnerText; + string name = doc.DocumentNode.SelectSingleNode("//h1").ChildNodes[0].InnerText.Trim(); + if (name.StartsWith("[SMAPI]")) + name = name.Substring("[SMAPI]".Length).TrimStart(); // return info return page.SetInfo(name: name, version: version, url: url, downloads: Array.Empty()); From 6e7ebc0097f666a134335954afaaf9df29da3ed1 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 3 Oct 2020 10:55:00 -0400 Subject: [PATCH 12/14] fix typo in CP schema --- src/SMAPI.Web/wwwroot/schemas/content-patcher.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json index 2e7134cd7..e52cd757b 100644 --- a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json +++ b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json @@ -13,7 +13,7 @@ "type": "string", "const": "1.18.0", "@errorMessages": { - "const": "Incorrect value '@value'. This should be set to the latest format version, currently '1.17.0'." + "const": "Incorrect value '@value'. This should be set to the latest format version, currently '1.18.0'." } }, "ConfigSchema": { From d8f5e0bdf2da76677636e3e60979bb54da6339a7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 3 Oct 2020 20:24:54 -0400 Subject: [PATCH 13/14] update dependencies --- docs/release-notes.md | 1 + .../SMAPI.ModBuildConfig.Analyzer.Tests.csproj | 2 +- src/SMAPI.Tests/SMAPI.Tests.csproj | 2 +- src/SMAPI.Web/SMAPI.Web.csproj | 8 ++++---- src/SMAPI/SMAPI.csproj | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 3ba343425..940809591 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -13,6 +13,7 @@ * Fixed update alerts for Chucklefish forum mods broken by a recent site change. * For modders: + * Updated dependencies (including Mono.Cecil 0.11.2 → 0.11.3 and Platonymous.TMXTile 1.3.8 → 1.5.6). * Fixed asset propagation for `Data\MoviesReactions`. * Fixed error in content pack path handling when you pass a null path. diff --git a/src/SMAPI.ModBuildConfig.Analyzer.Tests/SMAPI.ModBuildConfig.Analyzer.Tests.csproj b/src/SMAPI.ModBuildConfig.Analyzer.Tests/SMAPI.ModBuildConfig.Analyzer.Tests.csproj index 9c230203e..93eb476e3 100644 --- a/src/SMAPI.ModBuildConfig.Analyzer.Tests/SMAPI.ModBuildConfig.Analyzer.Tests.csproj +++ b/src/SMAPI.ModBuildConfig.Analyzer.Tests/SMAPI.ModBuildConfig.Analyzer.Tests.csproj @@ -7,7 +7,7 @@ - + all diff --git a/src/SMAPI.Tests/SMAPI.Tests.csproj b/src/SMAPI.Tests/SMAPI.Tests.csproj index 6896808d9..1e13edc34 100644 --- a/src/SMAPI.Tests/SMAPI.Tests.csproj +++ b/src/SMAPI.Tests/SMAPI.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/SMAPI.Web/SMAPI.Web.csproj b/src/SMAPI.Web/SMAPI.Web.csproj index 23e0340db..72cbc8a99 100644 --- a/src/SMAPI.Web/SMAPI.Web.csproj +++ b/src/SMAPI.Web/SMAPI.Web.csproj @@ -12,14 +12,14 @@ - - + + - - + + diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj index 7d2b81999..969071cfa 100644 --- a/src/SMAPI/SMAPI.csproj +++ b/src/SMAPI/SMAPI.csproj @@ -14,9 +14,9 @@ - + - + From 68e9733a856b41c2b74d5c35a4b812e68157fbca Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 3 Oct 2020 20:27:29 -0400 Subject: [PATCH 14/14] prepare for release --- build/common.targets | 2 +- docs/release-notes.md | 4 +++- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build/common.targets b/build/common.targets index 7c2c5cadb..171279a59 100644 --- a/build/common.targets +++ b/build/common.targets @@ -4,7 +4,7 @@ - 3.7.3 + 3.7.4 SMAPI latest diff --git a/docs/release-notes.md b/docs/release-notes.md index 940809591..16afd6378 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,7 +7,9 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> -## Upcoming release +## 3.7.4 +Released 03 October 2020 for Stardew Valley 1.4.1 or later. + * For players: * Improved performance on some older computers (thanks to millerscout!). * Fixed update alerts for Chucklefish forum mods broken by a recent site change. diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index e45064313..a8499ce27 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,9 +1,9 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "3.7.3", + "Version": "3.7.4", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "3.7.3" + "MinimumApiVersion": "3.7.4" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index 34f553ba2..ed0d94a93 100644 --- a/src/SMAPI.Mods.SaveBackup/manifest.json +++ b/src/SMAPI.Mods.SaveBackup/manifest.json @@ -1,9 +1,9 @@ { "Name": "Save Backup", "Author": "SMAPI", - "Version": "3.7.3", + "Version": "3.7.4", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "3.7.3" + "MinimumApiVersion": "3.7.4" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 48428420e..3927d477f 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -51,7 +51,7 @@ public static class Constants ** Public ****/ /// SMAPI's current semantic version. - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.3"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.4"); /// The minimum supported version of Stardew Valley. public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.1");