summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ConsoleCommands/Framework/Commands
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-03-17 19:22:03 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-03-17 19:22:03 -0400
commit552886a0f3b8d309df9ce85343f41ca7d2fc1d28 (patch)
tree01647efb65d654c8aa9a28dd231c23256561164e /src/SMAPI.Mods.ConsoleCommands/Framework/Commands
parent4a7fb8bad2eabb215240e6a6d3febd1e91b3c2d5 (diff)
downloadSMAPI-552886a0f3b8d309df9ce85343f41ca7d2fc1d28.tar.gz
SMAPI-552886a0f3b8d309df9ce85343f41ca7d2fc1d28.tar.bz2
SMAPI-552886a0f3b8d309df9ce85343f41ca7d2fc1d28.zip
fix world_clear removing chests that match a debris name
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework/Commands')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs9
1 files changed, 8 insertions, 1 deletions
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);