diff options
Diffstat (limited to 'src/TrainerMod')
-rw-r--r-- | src/TrainerMod/TrainerMod.cs | 10 | ||||
-rw-r--r-- | src/TrainerMod/TrainerMod.csproj | 9 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/TrainerMod/TrainerMod.cs b/src/TrainerMod/TrainerMod.cs index 168b7e8e..95c7cbaf 100644 --- a/src/TrainerMod/TrainerMod.cs +++ b/src/TrainerMod/TrainerMod.cs @@ -111,7 +111,9 @@ namespace TrainerMod .Add("world_setminelevel", "Sets the mine level?\n\nUsage: world_setminelevel <value>\n- value: The target level (a number between 1 and 120).", this.HandleCommand) .Add("show_game_files", "Opens the game folder.", this.HandleCommand) - .Add("show_data_files", "Opens the folder containing the save and log files.", this.HandleCommand); + .Add("show_data_files", "Opens the folder containing the save and log files.", this.HandleCommand) + + .Add("debug", "Run one of the game's debug commands; for example, 'debug warp FarmHouse 1 1' warps the player to the farmhouse.", this.HandleCommand); } /// <summary>Handle a TrainerMod command.</summary> @@ -121,6 +123,12 @@ namespace TrainerMod { switch (command) { + case "debug": + string debugCommand = string.Join(" ", args); + this.Monitor.Log($"Sending debug command to the game: {debugCommand}...", LogLevel.Info); + Game1.game1.parseDebugInput(debugCommand); + break; + case "save": this.Monitor.Log("Saving the game...", LogLevel.Info); SaveGame.Save(); diff --git a/src/TrainerMod/TrainerMod.csproj b/src/TrainerMod/TrainerMod.csproj index 0bd667d4..46d8bef9 100644 --- a/src/TrainerMod/TrainerMod.csproj +++ b/src/TrainerMod/TrainerMod.csproj @@ -3,7 +3,7 @@ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> <ProjectGuid>{28480467-1A48-46A7-99F8-236D95225359}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> @@ -12,7 +12,7 @@ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>true</Optimize> @@ -24,7 +24,7 @@ <Prefer32Bit>false</Prefer32Bit> <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>$(SolutionDir)\..\bin\Release\Mods\TrainerMod\</OutputPath> @@ -80,8 +80,7 @@ </PropertyGroup> <Target Name="AfterBuild" Condition="$(Configuration) == 'Debug'"> <Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\Mods\TrainerMod" /> - <Copy SourceFiles="$(TargetDir)\$(TargetName).dll.mdb" DestinationFolder="$(GamePath)\Mods\TrainerMod" Condition="$(OS) != 'Windows_NT'" /> - <Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\Mods\TrainerMod" Condition="$(OS) == 'Windows_NT'" /> + <Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\Mods\TrainerMod" Condition="Exists('$(TargetDir)\$(TargetName).pdb')" /> <Copy SourceFiles="$(TargetDir)\manifest.json" DestinationFolder="$(GamePath)\Mods\TrainerMod" /> </Target> </Project>
\ No newline at end of file |