Merge branch 'develop' into stable

This commit is contained in:
Jesse Plamondon-Willard 2021-03-08 00:08:28 -05:00
commit fc5fc54ab1
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
8 changed files with 101 additions and 21 deletions

View File

@ -4,7 +4,7 @@
<!--set properties -->
<PropertyGroup>
<Version>3.9.3</Version>
<Version>3.9.4</Version>
<Product>SMAPI</Product>
<LangVersion>latest</LangVersion>

View File

@ -7,6 +7,12 @@
* Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info).
-->
## 3.9.4
Released 07 March 2021 for Stardew Valley 1.5.4 or later.
* For players:
* Fixed installer error if the `Mods` folder doesn't exist in 3.9.3.
## 3.9.3
Released 07 March 2021 for Stardew Valley 1.5.4 or later.
@ -20,6 +26,9 @@ Released 07 March 2021 for Stardew Valley 1.5.4 or later.
* Fixed `RewriteMods` option ignored when rewriting for OS compatibility.
* Fixed edge case when playing as a farmhand in non-English where translatable assets loaded via `IAssetLoader` weren't reapplied immediately when the server disconnects.
* For the web UI:
* Updated the JSON validator/schema for Content Patcher 1.21.
## 3.9.2
Released 21 February 2021 for Stardew Valley 1.5.4 or later.

View File

@ -1,9 +1,9 @@
{
"Name": "Console Commands",
"Author": "SMAPI",
"Version": "3.9.3",
"Version": "3.9.4",
"Description": "Adds SMAPI console commands that let you manipulate the game.",
"UniqueID": "SMAPI.ConsoleCommands",
"EntryDll": "ConsoleCommands.dll",
"MinimumApiVersion": "3.9.3"
"MinimumApiVersion": "3.9.4"
}

View File

@ -1,9 +1,9 @@
{
"Name": "Error Handler",
"Author": "SMAPI",
"Version": "3.9.3",
"Version": "3.9.4",
"Description": "Handles some common vanilla errors to log more useful info or avoid breaking the game.",
"UniqueID": "SMAPI.ErrorHandler",
"EntryDll": "ErrorHandler.dll",
"MinimumApiVersion": "3.9.3"
"MinimumApiVersion": "3.9.4"
}

View File

@ -1,9 +1,9 @@
{
"Name": "Save Backup",
"Author": "SMAPI",
"Version": "3.9.3",
"Version": "3.9.4",
"Description": "Automatically backs up all your saves once per day into its folder.",
"UniqueID": "SMAPI.SaveBackup",
"EntryDll": "SaveBackup.dll",
"MinimumApiVersion": "3.9.3"
"MinimumApiVersion": "3.9.4"
}

View File

@ -139,6 +139,9 @@ namespace StardewModdingAPI.Toolkit.Utilities
/// <param name="rootPath">The root path to search.</param>
internal static IEnumerable<string> GetTooLongPaths(string rootPath)
{
if (!Directory.Exists(rootPath))
return new string[0];
return Directory
.EnumerateFileSystemEntries(rootPath, "*.*", SearchOption.AllDirectories)
.Where(PathUtilities.IsPathTooLong);

View File

@ -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.20.0",
"const": "1.21.0",
"@errorMessages": {
"const": "Incorrect value '@value'. This should be set to the latest format version, currently '1.20.0'."
"const": "Incorrect value '@value'. This should be set to the latest format version, currently '1.21.0'."
}
},
"ConfigSchema": {
@ -69,6 +69,65 @@
}
}
},
"CustomLocations": {
"title": "Custom locations",
"description": "The custom in-game locations to make available.",
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"title": "Name",
"description": "The location's unique internal name. This can't contain tokens. The name must begin with 'Custom_' (to avoid conflicting with current or future vanilla locations), can only contain alphanumeric or underscore characters, and must be *globally* unique. Prefixing it with your mod name is strongly recommended.",
"type": "string",
"allOf": [
{
"pattern": "^ *Custom_"
},
{
"pattern": "^ *[a-zA-Z0-9_]+ *$"
},
{
"pattern": "^ *Custom_.+_.+ *$"
}
],
"@errorMessages": {
"allOf:indexes: 0": "Custom location names must start with the exact text 'Custom_'.",
"allOf:indexes: 1": "Custom location names can only contain alphanumeric or underscore characters.",
"allOf:indexes: 2": "The location name should have three parts separated by underscores: the exact text 'Custom', a short label or acronym for your mod, and a map name (like 'Custom_YourModName_MapName'). Although not strictly required, this is very strongly recommended due to the consequences if two mods accidentally use the same location name."
}
},
"FromMapFile": {
"title": "From map file",
"description": "The relative path to the location's map file in your content pack folder (file can be .tmx, .tbin, or .xnb). This can't contain tokens, but you can make conditional changes using EditMap.",
"type": "string",
"allOf": [
{
"not": {
"pattern": "\b\\.\\.[/\\]"
}
},
{
"pattern": "\\.(tbin|tmx|xnb) *$"
}
],
"@errorMessages": {
"allOf:indexes: 0": "Invalid value; must not contain directory climbing (like '../').",
"allOf:indexes: 1": "Invalid value; must be a file path ending with .tbin, .tmx, or .xnb."
}
},
"MigrateLegacyNames": {
"title": "Migrate legacy names",
"description": "An optional list of former location names that may appear in the save file instead of the one given by Name. This can't contain tokens. This is only meant to allow migrating older locations, and shouldn't be used in most cases.",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
},
"DynamicTokens": {
"title": "Dynamic tokens",
"description": "Custom tokens that you can use.",
@ -127,7 +186,7 @@
},
"Enabled": {
"title": "Enabled",
"description": "Whether to apply this patch. Default true. This fields supports immutable tokens (e.g. config tokens) if they return true/false.",
"description": "Whether to apply this patch. Default true. This field does not allow tokens.",
"anyOf": [
{
"type": "boolean"
@ -135,10 +194,6 @@
{
"type": "string",
"enum": [ "true", "false" ]
},
{
"type": "string",
"pattern": "\\{\\{[^{}]+\\}\\}"
}
],
"@errorMessages": {
@ -267,6 +322,18 @@
}
}
},
"AddWarps": {
"title": "Add warps",
"description": "The warp values to add to the location, in the format recognized by the game's Warp map property.",
"type": "array",
"items": {
"type": "string",
"pattern": " *-?\\d+ -?\\d+ [A-Za-z0-9_]+ -?\\d+ -?\\d+ *$",
"@errorMessages": {
"pattern": "Each warp must match the exact format recognized by the game's Warp map property (i.e. 'fromX fromY targetMap targetX targetY', like '10 10 Town 0 30'."
}
}
},
"MapProperties": {
"title": "Map properties",
"description": "The map properties (not tile properties) to add, replace, or delete. To add an property, just specify a key that doesn't exist; to delete an entry, set the value to null (like \"some key\": null). This field supports tokens in property keys and values.",
@ -441,6 +508,7 @@
"Update",
"When",
"AddWarps",
"FromArea",
"MapProperties",
"MapTiles",
@ -495,13 +563,13 @@
"title": "X position",
"description": "The X position, measured in pixels for a texture or tiles for a map. This can contain tokens.",
"type": [ "integer", "string" ],
"minimum:": 0
"minimum": 0
},
"Y": {
"title": "Y position",
"description": "The Y position, measured in pixels for a texture or tiles for a map. This can contain tokens.",
"type": [ "integer", "string" ],
"minimum:": 0
"minimum": 0
}
},
@ -515,25 +583,25 @@
"title": "X position",
"description": "The X position of the area's top-left corner, measured in pixels for a texture or tiles for a map. This can contain tokens.",
"type": [ "integer", "string" ],
"minimum:": 0
"minimum": 0
},
"Y": {
"title": "Y position",
"description": "The Y position of the area's top-left corner, measured in pixels for a texture or tiles for a map. This can contain tokens.",
"type": [ "integer", "string" ],
"minimum:": 0
"minimum": 0
},
"Width": {
"title": "Width",
"description": "The width of the area, measured in pixels for a texture or tiles for a map. This can contain tokens.",
"type": [ "integer", "string" ],
"minimum:": 0
"minimum": 0
},
"Height": {
"title": "Height",
"description": "The height of the area, measured in pixels for a texture or tiles for a map. This can contain tokens.",
"type": [ "integer", "string" ],
"minimum:": 0
"minimum": 0
}
},

View File

@ -54,7 +54,7 @@ namespace StardewModdingAPI
** Public
****/
/// <summary>SMAPI's current semantic version.</summary>
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.9.3");
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.9.4");
/// <summary>The minimum supported version of Stardew Valley.</summary>
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.5.4");