diff --git a/build/common.targets b/build/common.targets index 2ffd231d..76e76c74 100644 --- a/build/common.targets +++ b/build/common.targets @@ -4,7 +4,7 @@ - 3.7.3 + 3.7.4 SMAPI latest diff --git a/build/define-constant.targets b/build/define-constant.targets index ec956e60..8968b40a 100644 --- a/build/define-constant.targets +++ b/build/define-constant.targets @@ -6,7 +6,7 @@ - Tru e + True $(DefineConstants);HARMONY_1 $(DefineConstants);SMAPI_FOR_MOBILE;ANDROID_TARGET_GOOGLE;ANDROID_TARGET_MOBILE_LEGACY;HARMONY_1 $(DefineConstants);SMAPI_FOR_MOBILE;ANDROID_TARGET_GOOGLE;HARMONY_1 diff --git a/build/prepare-nuget-package.targets b/build/prepare-nuget-package.targets deleted file mode 100644 index 0682d9ff..00000000 --- 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 86817546..16afd637 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -7,6 +7,24 @@ * Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info). --> +## 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. + +* 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. + +* For the web UI: + * Updated the JSON validator/schema for Content Patcher 1.18. + +* For SMAPI developers: + * 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/docs/technical/mod-package.md b/docs/technical/mod-package.md index a1457405..f7475e37 100644 --- a/docs/technical/mod-package.md +++ b/docs/technical/mod-package.md @@ -343,19 +343,16 @@ 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 +## 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. + ### 3.2.1 Released 11 September 2020. 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 9c230203..93eb476e 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.ModBuildConfig/Framework/ModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs index 636c3669..6dd595e5 100644 --- a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs +++ b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs @@ -164,6 +164,11 @@ namespace StardewModdingAPI.ModBuildConfig.Framework || 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) diff --git a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj index 605096d9..1813f58b 100644 --- a/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj +++ b/src/SMAPI.ModBuildConfig/SMAPI.ModBuildConfig.csproj @@ -1,10 +1,26 @@  + StardewModdingAPI.ModBuildConfig - 3.2.1 net45 x86 - false + latest + true + + + Pathoschild.Stardew.ModBuildConfig + Build package for SMAPI mods + 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 + + - Reworked and streamlined how the package is compiled. + - Added SMAPI-ModTranslationClassBuilder files to the ignore list. + + false @@ -16,16 +32,22 @@ - + - + - + + + + + + + + + + - - - diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec deleted file mode 100644 index 05aed8f9..00000000 --- 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.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index e4506431..a8499ce2 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 34f553ba..ed0d94a9 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.Tests/SMAPI.Tests.csproj b/src/SMAPI.Tests/SMAPI.Tests.csproj index 4bb9ab61..da1d9e28 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/Framework/Clients/Chucklefish/ChucklefishClient.cs b/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs index ca156da4..b8b05878 100644 --- a/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs +++ b/src/SMAPI.Web/Framework/Clients/Chucklefish/ChucklefishClient.cs @@ -67,10 +67,10 @@ namespace StardewModdingAPI.Web.Framework.Clients.Chucklefish // 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()); diff --git a/src/SMAPI.Web/SMAPI.Web.csproj b/src/SMAPI.Web/SMAPI.Web.csproj index 23e0340d..72cbc8a9 100644 --- a/src/SMAPI.Web/SMAPI.Web.csproj +++ b/src/SMAPI.Web/SMAPI.Web.csproj @@ -12,14 +12,14 @@ - - + + - - + + diff --git a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json index 3fd24e4e..e52cd757 100644 --- a/src/SMAPI.Web/wwwroot/schemas/content-patcher.json +++ b/src/SMAPI.Web/wwwroot/schemas/content-patcher.json @@ -11,9 +11,9 @@ "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'." + "const": "Incorrect value '@value'. This should be set to the latest format version, currently '1.18.0'." } }, "ConfigSchema": { @@ -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" ] } diff --git a/src/SMAPI.sln b/src/SMAPI.sln index ceb12e8a..d1068212 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 ..\build\define-constant.targets = ..\build\define-constant.targets EndProjectSection EndProject @@ -88,7 +87,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 diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 32e53040..680e99e6 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -64,13 +64,13 @@ namespace StardewModdingAPI ****/ /// SMAPI's current semantic version. #if SMAPI_FOR_MOBILE - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.3.4", true); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.4"); /// Android SMAPI's current semantic version. public static ISemanticVersion AndroidApiVersion { get; } = new Toolkit.SemanticVersion("0.8.8"); #else - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.3"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.7.4"); #endif #if ANDROID_TARGET_MOBILE_LEGACY diff --git a/src/SMAPI/Framework/ContentPack.cs b/src/SMAPI/Framework/ContentPack.cs index 161fdbe4..a6835dbe 100644 --- a/src/SMAPI/Framework/ContentPack.cs +++ b/src/SMAPI/Framework/ContentPack.cs @@ -119,7 +119,7 @@ namespace StardewModdingAPI.Framework 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; } diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 8ae7b759..50a022ff 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -298,15 +298,14 @@ namespace StardewModdingAPI.Framework ); // add exit handler - new Thread(() => + this.CancellationToken.Token.Register(() => { - this.CancellationToken.Token.WaitHandle.WaitOne(); if (this.IsGameRunning) { this.LogManager.WriteCrashLog(); this.Game.Exit(); } - }).Start(); + }); // set window titles this.SetWindowTitles( diff --git a/src/SMAPI/Framework/Serialization/RectangleConverter.cs b/src/SMAPI/Framework/Serialization/RectangleConverter.cs index a5780d8a..8f7318b3 100644 --- a/src/SMAPI/Framework/Serialization/RectangleConverter.cs +++ b/src/SMAPI/Framework/Serialization/RectangleConverter.cs @@ -37,7 +37,7 @@ namespace StardewModdingAPI.Framework.Serialization 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})."); diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index 95ebf266..2c0b3392 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -263,7 +263,7 @@ namespace StardewModdingAPI.Metadata 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)); diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj index f23cec00..89c9f688 100644 --- a/src/SMAPI/SMAPI.csproj +++ b/src/SMAPI/SMAPI.csproj @@ -58,9 +58,9 @@ - + - +