rename TrainerMod to Console Commands to clarify purpose

This commit is contained in:
Jesse Plamondon-Willard 2017-10-27 03:18:48 -04:00
parent b945fcf555
commit 59dd604cf2
40 changed files with 68 additions and 95 deletions

View File

@ -78,7 +78,7 @@
<!-- copy files into game directory and enable debugging (only in debug mode) -->
<Target Name="AfterBuild">
<CallTarget Targets="CopySMAPI;CopyTrainerMod" Condition="'$(Configuration)' == 'Debug'" />
<CallTarget Targets="CopySMAPI;CopyDefaultMod" Condition="'$(Configuration)' == 'Debug'" />
</Target>
<Target Name="CopySMAPI" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI'">
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" />
@ -89,10 +89,10 @@
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)" />
</Target>
<Target Name="CopyTrainerMod" Condition="'$(MSBuildProjectName)' == 'TrainerMod'">
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\Mods\TrainerMod" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\Mods\TrainerMod" Condition="Exists('$(TargetDir)\$(TargetName).pdb')" />
<Copy SourceFiles="$(TargetDir)\manifest.json" DestinationFolder="$(GamePath)\Mods\TrainerMod" />
<Target Name="CopyDefaultMod" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.ConsoleCommands'">
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\Mods\ConsoleCommands" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\Mods\ConsoleCommands" Condition="Exists('$(TargetDir)\$(TargetName).pdb')" />
<Copy SourceFiles="$(TargetDir)\manifest.json" DestinationFolder="$(GamePath)\Mods\ConsoleCommands" />
</Target>
<!-- launch SMAPI on debug -->

View File

@ -4,6 +4,7 @@
* Fixed compatibility check crashing for players with Stardew Valley 1.08.
* Fixed the game's test messages being shown in the console and log.
* Fixed TrainerMod's `player_setlevel` command not also setting XP.
* Renamed the default _TrainerMod_ mod to _Console Commands_ to clarify its purpose.
* For modders:
* Added support for public code in reflection API, to simplify mod integrations.

View File

@ -97,6 +97,7 @@ namespace StardewModdingApi.Installer
// obsolete
yield return GetInstallPath("Mods/.cache"); // 1.3-1.4
yield return GetInstallPath("Mods/TrainerMod"); // *2.0 (renamed to ConsoleCommands)
yield return GetInstallPath("Mono.Cecil.Rocks.dll"); // 1.31.8
yield return GetInstallPath("StardewModdingAPI-settings.json"); // 1.0-1.4
if (modsDir.Exists)

View File

@ -1,14 +1,13 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using TrainerMod.Framework.Commands;
using StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands;
namespace TrainerMod
namespace StardewModdingAPI.Mods.ConsoleCommands
{
/// <summary>The main entry point for the mod.</summary>
public class TrainerMod : Mod
public class ConsoleCommandsMod : Mod
{
/*********
** Properties
@ -52,7 +51,7 @@ namespace TrainerMod
}
}
/// <summary>Handle a TrainerMod command.</summary>
/// <summary>Handle a console command.</summary>
/// <param name="command">The command to invoke.</param>
/// <param name="commandName">The command name specified by the user.</param>
/// <param name="args">The command arguments.</param>

View File

@ -2,9 +2,8 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using StardewModdingAPI;
namespace TrainerMod.Framework.Commands
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands
{
/// <summary>Provides methods for parsing command-line arguments.</summary>
internal class ArgumentParser : IReadOnlyList<string>

View File

@ -1,8 +1,6 @@
using StardewModdingAPI;
namespace TrainerMod.Framework.Commands
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands
{
/// <summary>A TrainerMod command to register.</summary>
/// <summary>A console command to register.</summary>
internal interface ITrainerCommand
{
/*********

View File

@ -1,7 +1,6 @@
using StardewModdingAPI;
using StardewValley;
using StardewValley;
namespace TrainerMod.Framework.Commands.Other
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Other
{
/// <summary>A command which sends a debug command to the game.</summary>
internal class DebugCommand : TrainerCommand

View File

@ -1,7 +1,6 @@
using System.Diagnostics;
using StardewModdingAPI;
namespace TrainerMod.Framework.Commands.Other
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Other
{
/// <summary>A command which shows the data files.</summary>
internal class ShowDataFilesCommand : TrainerCommand

View File

@ -1,7 +1,6 @@
using System.Diagnostics;
using StardewModdingAPI;
namespace TrainerMod.Framework.Commands.Other
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Other
{
/// <summary>A command which shows the game files.</summary>
internal class ShowGameFilesCommand : TrainerCommand

View File

@ -1,11 +1,10 @@
using System;
using System.Linq;
using StardewModdingAPI;
using StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData;
using StardewValley;
using TrainerMod.Framework.ItemData;
using Object = StardewValley.Object;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which adds an item to the player inventory.</summary>
internal class AddCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using TrainerMod.Framework.ItemData;
using StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which list item types.</summary>
internal class ListItemTypesCommand : TrainerCommand

View File

@ -1,10 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using StardewModdingAPI;
using TrainerMod.Framework.ItemData;
using StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which list items available to spawn.</summary>
internal class ListItemsCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using Microsoft.Xna.Framework;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the color of a player feature.</summary>
internal class SetColorCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's current health.</summary>
internal class SetHealthCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's current immunity.</summary>
internal class SetImmunityCommand : TrainerCommand

View File

@ -1,9 +1,8 @@
using System.Collections.Generic;
using StardewModdingAPI;
using StardewValley;
using SFarmer = StardewValley.Farmer;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's current level for a skill.</summary>
internal class SetLevelCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's maximum health.</summary>
internal class SetMaxHealthCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's maximum stamina.</summary>
internal class SetMaxStaminaCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's current money.</summary>
internal class SetMoneyCommand : TrainerCommand

View File

@ -1,7 +1,6 @@
using StardewModdingAPI;
using StardewValley;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's name.</summary>
internal class SetNameCommand : TrainerCommand

View File

@ -1,7 +1,6 @@
using StardewModdingAPI;
using StardewValley;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's current added speed.</summary>
internal class SetSpeedCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits the player's current stamina.</summary>
internal class SetStaminaCommand : TrainerCommand

View File

@ -1,7 +1,6 @@
using StardewModdingAPI;
using StardewValley;
using StardewValley;
namespace TrainerMod.Framework.Commands.Player
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.Player
{
/// <summary>A command which edits a player style.</summary>
internal class SetStyleCommand : TrainerCommand

View File

@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using StardewModdingAPI;
namespace TrainerMod.Framework.Commands
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands
{
/// <summary>The base implementation for a trainer command.</summary>
internal abstract class TrainerCommand : ITrainerCommand

View File

@ -1,8 +1,7 @@
using StardewModdingAPI;
using StardewValley;
using StardewValley;
using StardewValley.Locations;
namespace TrainerMod.Framework.Commands.World
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
/// <summary>A command which moves the player to the next mine level.</summary>
internal class DownMineLevelCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.World
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
/// <summary>A command which freezes the current time.</summary>
internal class FreezeTimeCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.World
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
/// <summary>A command which sets the current day.</summary>
internal class SetDayCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.World
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
/// <summary>A command which moves the player to the given mine level.</summary>
internal class SetMineLevelCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.World
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
/// <summary>A command which sets the current season.</summary>
internal class SetSeasonCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.World
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
/// <summary>A command which sets the current time.</summary>
internal class SetTimeCommand : TrainerCommand

View File

@ -1,8 +1,7 @@
using System.Linq;
using StardewModdingAPI;
using StardewValley;
namespace TrainerMod.Framework.Commands.World
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands.World
{
/// <summary>A command which sets the current year.</summary>
internal class SetYearCommand : TrainerCommand

View File

@ -1,4 +1,4 @@
namespace TrainerMod.Framework.ItemData
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData
{
/// <summary>An item type that can be searched and added to the player through the console.</summary>
internal enum ItemType

View File

@ -1,6 +1,6 @@
using StardewValley;
namespace TrainerMod.Framework.ItemData
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData
{
/// <summary>A game item with metadata.</summary>
internal class SearchableItem

View File

@ -1,12 +1,12 @@
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using StardewModdingAPI.Mods.ConsoleCommands.Framework.ItemData;
using StardewValley;
using StardewValley.Objects;
using StardewValley.Tools;
using TrainerMod.Framework.ItemData;
using SObject = StardewValley.Object;
namespace TrainerMod.Framework
namespace StardewModdingAPI.Mods.ConsoleCommands.Framework
{
/// <summary>Provides methods for searching and constructing items.</summary>
internal class ItemRepository

View File

@ -0,0 +1,6 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("SMAPI.Mods.ConsoleCommands")]
[assembly: AssemblyDescription("")]
[assembly: Guid("76791e28-b1b5-407c-82d6-50c3e5b7e037")]

View File

@ -7,8 +7,8 @@
<ProjectGuid>{28480467-1A48-46A7-99F8-236D95225359}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TrainerMod</RootNamespace>
<AssemblyName>TrainerMod</AssemblyName>
<RootNamespace>StardewModdingAPI.Mods.ConsoleCommands</RootNamespace>
<AssemblyName>ConsoleCommands</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
@ -16,7 +16,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Debug\Mods\TrainerMod\</OutputPath>
<OutputPath>$(SolutionDir)\..\bin\Debug\Mods\ConsoleCommands\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -27,7 +27,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Release\Mods\TrainerMod\</OutputPath>
<OutputPath>$(SolutionDir)\..\bin\Release\Mods\ConsoleCommands\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -80,7 +80,7 @@
<Compile Include="Framework\Commands\ITrainerCommand.cs" />
<Compile Include="Framework\ItemData\SearchableItem.cs" />
<Compile Include="Framework\ItemRepository.cs" />
<Compile Include="TrainerMod.cs" />
<Compile Include="ConsoleCommandsMod.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,5 @@
{
"Name": "Trainer Mod",
"Name": "Console Commands",
"Author": "SMAPI",
"Version": {
"MajorVersion": 2,
@ -8,6 +8,6 @@
"Build": null
},
"Description": "Adds SMAPI console commands that let you manipulate the game.",
"UniqueID": "SMAPI.TrainerMod",
"EntryDll": "TrainerMod.dll"
"UniqueID": "SMAPI.ConsoleCommands",
"EntryDll": "ConsoleCommands.dll"
}

View File

@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
VisualStudioVersion = 15.0.27004.2002
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrainerMod", "TrainerMod\TrainerMod.csproj", "{28480467-1A48-46A7-99F8-236D95225359}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleCommands", "SMAPI.Mods.ConsoleCommands\StardewModdingAPI.Mods.ConsoleCommands.csproj", "{28480467-1A48-46A7-99F8-236D95225359}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StardewModdingAPI", "SMAPI\StardewModdingAPI.csproj", "{F1A573B0-F436-472C-AE29-0B91EA6B9F8F}"
EndProject

View File

@ -1,6 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("TrainerMod")]
[assembly: AssemblyDescription("")]
[assembly: Guid("76791e28-b1b5-407c-82d6-50c3e5b7e037")]