summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ConsoleCommands
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands')
-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);