summaryrefslogtreecommitdiff
path: root/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-03-11 19:09:08 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-03-11 19:09:08 -0400
commit41715cefcde3c838bb079cb37aac5a3b2dcb1004 (patch)
tree88d5d6c035acb9a2b48fb60f635ccb2156788e9f /src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World
parent80315ec46695d9c2b1121a0a6208105d7e165e89 (diff)
downloadSMAPI-41715cefcde3c838bb079cb37aac5a3b2dcb1004.tar.gz
SMAPI-41715cefcde3c838bb079cb37aac5a3b2dcb1004.tar.bz2
SMAPI-41715cefcde3c838bb079cb37aac5a3b2dcb1004.zip
add initial compatibility with Stardew Valley 1.3 (#453)
Diffstat (limited to 'src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs6
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs
index da117006..c83c3b07 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs
@@ -1,4 +1,4 @@
-using StardewValley;
+using StardewValley;
using StardewValley.Locations;
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
@@ -21,7 +21,11 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
int level = (Game1.currentLocation as MineShaft)?.mineLevel ?? 0;
monitor.Log($"OK, warping you to mine level {level + 1}.", LogLevel.Info);
+#if STARDEW_VALLEY_1_3
+ Game1.enterMine(level + 1);
+#else
Game1.enterMine(false, level + 1, "");
+#endif
}
}
}
diff --git a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs
index 1024b7b6..5947af1a 100644
--- a/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs
+++ b/src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using StardewValley;
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
@@ -26,7 +26,11 @@ namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
// handle
level = Math.Max(1, level);
monitor.Log($"OK, warping you to mine level {level}.", LogLevel.Info);
+#if STARDEW_VALLEY_1_3
+ Game1.enterMine(level);
+#else
Game1.enterMine(true, level, "");
+#endif
}
}
}