From 552886a0f3b8d309df9ce85343f41ca7d2fc1d28 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 17 Mar 2019 19:22:03 -0400 Subject: fix world_clear removing chests that match a debris name --- .../Framework/Commands/World/ClearCommand.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Mods.ConsoleCommands') diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs index c769b622..bd6c7952 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs @@ -83,7 +83,14 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World } removed += - this.RemoveObjects(location, obj => obj.Name.ToLower().Contains("weed") || obj.Name == "Twig" || obj.Name == "Stone") + this.RemoveObjects(location, obj => + !(obj is Chest) + && ( + obj.Name == "Weeds" + || obj.Name == "Stone" + || (obj.ParentSheetIndex == 294 || obj.ParentSheetIndex == 295) + ) + ) + this.RemoveResourceClumps(location, clump => this.DebrisClumps.Contains(clump.parentSheetIndex.Value)); monitor.Log($"Done! Removed {removed} entities from {location.Name}.", LogLevel.Info); -- cgit From 2a976f7236869fe929fa273deafe2b1b9661c3c4 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 17 Mar 2019 19:42:49 -0400 Subject: add crops to world_clear --- docs/release-notes.md | 3 ++- .../Framework/Commands/World/ClearCommand.cs | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/SMAPI.Mods.ConsoleCommands') diff --git a/docs/release-notes.md b/docs/release-notes.md index 228160c9..e7ec77fb 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -5,7 +5,8 @@ These changes have not been released yet. * For players: * Updated game version check for the upcoming Stardew Valley 1.4. * Updated compatibility list. - * Fixed `world_clear debris` console command removing chests edited to have a debris name. + * Added crops option to `world_clear` console command. + * Fixed `world_clear` console command removing chests edited to have a debris name. * For the web UI: * The log parser now hides some messages by default, like the mod list. diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs index bd6c7952..e9545575 100644 --- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs +++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs @@ -16,7 +16,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World ** Fields *********/ /// The valid types that can be cleared. - private readonly string[] ValidTypes = { "debris", "fruit-trees", "grass", "trees", "everything" }; + private readonly string[] ValidTypes = { "crops", "debris", "fruit-trees", "grass", "trees", "everything" }; /// The resource clump IDs to consider debris. private readonly int[] DebrisClumps = { ResourceClump.stumpIndex, ResourceClump.hollowLogIndex, ResourceClump.meteoriteIndex, ResourceClump.boulderIndex }; @@ -32,7 +32,7 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World description: "Clears in-game entities in a given location.\n\n" + "Usage: world_clear \n" + "- location: the location name for which to clear objects (like Farm), or 'current' for the current location.\n" - + " - object type: the type of object clear. You can specify 'debris' (stones/twigs/weeds and dead crops), 'grass', and 'trees' / 'fruit-trees'. You can also specify 'everything', which includes things not removed by the other types (like furniture or resource clumps)." + + " - object type: the type of object clear. You can specify 'crops', 'debris' (stones/twigs/weeds and dead crops), 'grass', and 'trees' / 'fruit-trees'. You can also specify 'everything', which includes things not removed by the other types (like furniture or resource clumps)." ) { } @@ -69,6 +69,15 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World // apply switch (type) { + case "crops": + { + int removed = + this.RemoveTerrainFeatures(location, p => p is HoeDirt) + + this.RemoveResourceClumps(location, p => p is GiantCrop); + monitor.Log($"Done! Removed {removed} entities from {location.Name}.", LogLevel.Info); + break; + } + case "debris": { int removed = 0; -- cgit From 4a494c67bdfe2c07ef5c49c55541a0f6e29627cf Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 17 Mar 2019 21:34:44 -0400 Subject: prepare for 2.11.1 release --- build/GlobalAssemblyInfo.cs | 4 ++-- docs/release-notes.md | 14 ++++++-------- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) (limited to 'src/SMAPI.Mods.ConsoleCommands') diff --git a/build/GlobalAssemblyInfo.cs b/build/GlobalAssemblyInfo.cs index bac35ec3..45c4f311 100644 --- a/build/GlobalAssemblyInfo.cs +++ b/build/GlobalAssemblyInfo.cs @@ -1,5 +1,5 @@ using System.Reflection; [assembly: AssemblyProduct("SMAPI")] -[assembly: AssemblyVersion("2.11.0")] -[assembly: AssemblyFileVersion("2.11.0")] +[assembly: AssemblyVersion("2.11.1")] +[assembly: AssemblyFileVersion("2.11.1")] diff --git a/docs/release-notes.md b/docs/release-notes.md index e7ec77fb..5e7ca467 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,20 +1,18 @@ # Release notes -## Upcoming release -These changes have not been released yet. +## 2.11.1 +Released 17 March 2019 for Stardew Valley 1.3.36. * For players: - * Updated game version check for the upcoming Stardew Valley 1.4. - * Updated compatibility list. * Added crops option to `world_clear` console command. + * Prepared compatibility check for Stardew Valley 1.4. + * Updated mod compatibility list. * Fixed `world_clear` console command removing chests edited to have a debris name. * For the web UI: - * The log parser now hides some messages by default, like the mod list. + * Added support for suppressing false-positive warnings in rare cases. + * The log parser now collapses redundant sections by default. * Fixed log parser column resize bug. -* For SMAPI developers: - * Added support for suppressing false-positive warnings for specific mods. - ## 2.11 Released 01 March 2019 for Stardew Valley 1.3.36. diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index afefd733..1c4ea7d8 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": "2.11.0", + "Version": "2.11.1", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "2.11.0" + "MinimumApiVersion": "2.11.1" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index a5841a65..cfffd9c1 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": "2.11.0", + "Version": "2.11.1", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "2.11.0" + "MinimumApiVersion": "2.11.1" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 07557cd3..ca541513 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -20,7 +20,7 @@ namespace StardewModdingAPI ** Public ****/ /// SMAPI's current semantic version. - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.11.0"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.11.1"); /// The minimum supported version of Stardew Valley. public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.3.36"); -- cgit