summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ConsoleCommands
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-05-03 18:11:31 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-05-03 18:11:31 -0400
commit5d3d919d490fd414fe9647e566e92c71d7f64509 (patch)
treee1eab3352287ef04b5de4cdc28b550e255d58c3f /src/SMAPI.Mods.ConsoleCommands
parentc48f6d78cc412c5f2e40a8b460b7b3c1c993c51a (diff)
parent3447e2f575c2c83af729777e4d37e93f4c2a6467 (diff)
downloadSMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.tar.gz
SMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.tar.bz2
SMAPI-5d3d919d490fd414fe9647e566e92c71d7f64509.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs18
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/SMAPI.Mods.ConsoleCommands.csproj2
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/manifest.json4
3 files changed, 11 insertions, 13 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs
index 4b0e45a0..4cfaf242 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/ClearCommand.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.Linq;
using StardewValley;
using StardewValley.Locations;
@@ -224,18 +223,17 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
int removed = 0;
- // get resource clumps
- IList<ResourceClump> resourceClumps =
- (location as Farm)?.resourceClumps
- ?? (IList<ResourceClump>)(location as Woods)?.stumps
- ?? new List<ResourceClump>();
+ foreach (var clump in location.resourceClumps.Where(shouldRemove).ToArray())
+ {
+ location.resourceClumps.Remove(clump);
+ removed++;
+ }
- // remove matching clumps
- foreach (var clump in resourceClumps.ToArray())
+ if (location is Woods woods)
{
- if (shouldRemove(clump))
+ foreach (ResourceClump clump in woods.stumps.Where(shouldRemove).ToArray())
{
- resourceClumps.Remove(clump);
+ woods.stumps.Remove(clump);
removed++;
}
}
diff --git a/src/SMAPI.Mods.ConsoleCommands/SMAPI.Mods.ConsoleCommands.csproj b/src/SMAPI.Mods.ConsoleCommands/SMAPI.Mods.ConsoleCommands.csproj
index a187c1ff..432fdc35 100644
--- a/src/SMAPI.Mods.ConsoleCommands/SMAPI.Mods.ConsoleCommands.csproj
+++ b/src/SMAPI.Mods.ConsoleCommands/SMAPI.Mods.ConsoleCommands.csproj
@@ -19,7 +19,7 @@
<!-- Windows only -->
<ItemGroup Condition="'$(OS)' == 'Windows_NT'">
- <Reference Include="Netcode" HintPath="$(GamePath)\Netcode.dll" Private="False" />
+ <Reference Include="Netcode" HintPath="$(GamePath)\Netcode.dll" Private="False" Condition="!$(DefineConstants.Contains(SMAPI_FOR_WINDOWS_64BIT_HACK))" />
</ItemGroup>
<!-- Game framework -->
diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json
index 65c66d33..10e6733f 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.9.5",
+ "Version": "3.10.0",
"Description": "Adds SMAPI console commands that let you manipulate the game.",
"UniqueID": "SMAPI.ConsoleCommands",
"EntryDll": "ConsoleCommands.dll",
- "MinimumApiVersion": "3.9.5"
+ "MinimumApiVersion": "3.10.0"
}