From 2d824b34e478bd53a9cfae85332669755b326d84 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 14 Jan 2017 13:46:00 -0500 Subject: add console commands to open game & date folders (#172) --- src/TrainerMod/TrainerMod.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/TrainerMod') diff --git a/src/TrainerMod/TrainerMod.cs b/src/TrainerMod/TrainerMod.cs index f0c7549f..c76bb78c 100644 --- a/src/TrainerMod/TrainerMod.cs +++ b/src/TrainerMod/TrainerMod.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using Microsoft.Xna.Framework; using StardewModdingAPI; @@ -108,6 +109,9 @@ namespace TrainerMod Command.RegisterCommand("world_setseason", "Sets the season to the specified value | world_setseason ", new[] { "(winter, spring, summer, fall) The target season" }).CommandFired += this.HandleWorldSetSeason; Command.RegisterCommand("world_downminelevel", "Goes down one mine level? | world_downminelevel", new[] { "" }).CommandFired += this.HandleWorldDownMineLevel; Command.RegisterCommand("world_setminelevel", "Sets mine level? | world_setminelevel", new[] { "(Int32) The target level" }).CommandFired += this.HandleWorldSetMineLevel; + + Command.RegisterCommand("show_game_files", "Opens the game folder. | show_game_files").CommandFired += this.HandleShowGameFiles; + Command.RegisterCommand("show_data_files", "Opens the folder containing the save and log files. | show_data_files").CommandFired += this.HandleShowDataFiles; } /**** @@ -695,6 +699,22 @@ namespace TrainerMod this.LogValueNotSpecified(); } + /// The event raised when the 'show_game_files' command is triggered. + /// The event sender. + /// The event arguments. + private void HandleShowGameFiles(object sender, EventArgsCommand e) + { + Process.Start(Constants.ExecutionPath); + } + + /// The event raised when the 'show_data_files' command is triggered. + /// The event sender. + /// The event arguments. + private void HandleShowDataFiles(object sender, EventArgsCommand e) + { + Process.Start(Constants.DataPath); + } + /**** ** Helpers ****/ -- cgit From 6e04cbca3a2c812e1f9388ef465b3cad5067a264 Mon Sep 17 00:00:00 2001 From: Patrick Müssig Date: Sun, 15 Jan 2017 03:06:46 +0100 Subject: TrainerMod uses crossplatform.targets --- src/TrainerMod/TrainerMod.csproj | 1 + 1 file changed, 1 insertion(+) (limited to 'src/TrainerMod') diff --git a/src/TrainerMod/TrainerMod.csproj b/src/TrainerMod/TrainerMod.csproj index e262e135..9a7776f9 100644 --- a/src/TrainerMod/TrainerMod.csproj +++ b/src/TrainerMod/TrainerMod.csproj @@ -123,6 +123,7 @@ + -- cgit From 525172e831179fc5ca1d1b39eb441e97be28e842 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 14 Jan 2017 22:47:54 -0500 Subject: remove redundant TrainerMod build config (#214) --- release-notes.md | 1 + src/TrainerMod/TrainerMod.csproj | 52 ---------------------------------------- 2 files changed, 1 insertion(+), 52 deletions(-) (limited to 'src/TrainerMod') diff --git a/release-notes.md b/release-notes.md index cea89fc9..ffcfd560 100644 --- a/release-notes.md +++ b/release-notes.md @@ -18,6 +18,7 @@ For mod developers: For SMAPI developers: * Added support for specifying a lower bound in mod incompatibility data. * Added support for custom incompatible-mod-version error text. + * Fixed issue where `TrainerMod` used older logic to detect the game path. ## 1.5 See [log](https://github.com/Pathoschild/SMAPI/compare/1.4...1.5). diff --git a/src/TrainerMod/TrainerMod.csproj b/src/TrainerMod/TrainerMod.csproj index 9a7776f9..1457ac2b 100644 --- a/src/TrainerMod/TrainerMod.csproj +++ b/src/TrainerMod/TrainerMod.csproj @@ -37,54 +37,6 @@ true x86 - - - $(HOME)/GOG Games/Stardew Valley/game - $(HOME)/.local/share/Steam/steamapps/common/Stardew Valley - - $(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS - - C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley - C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley - - - - - - False - - - False - - - $(GamePath)\Stardew Valley.exe - False - - - $(GamePath)\xTile.dll - False - False - - - - - - - $(GamePath)\MonoGame.Framework.dll - False - False - - - $(GamePath)\StardewValley.exe - False - - - $(GamePath)\xTile.dll - False - - - - ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll @@ -129,10 +81,6 @@ - - - - -- cgit