From 59dd604cf2905adf5fce7e9bb7b97886891aae81 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 27 Oct 2017 03:18:48 -0400 Subject: rename TrainerMod to Console Commands to clarify purpose --- .../Framework/Commands/Player/SetStyleCommand.cs | 92 ---------------------- 1 file changed, 92 deletions(-) delete mode 100644 src/TrainerMod/Framework/Commands/Player/SetStyleCommand.cs (limited to 'src/TrainerMod/Framework/Commands/Player/SetStyleCommand.cs') diff --git a/src/TrainerMod/Framework/Commands/Player/SetStyleCommand.cs b/src/TrainerMod/Framework/Commands/Player/SetStyleCommand.cs deleted file mode 100644 index 96e34af2..00000000 --- a/src/TrainerMod/Framework/Commands/Player/SetStyleCommand.cs +++ /dev/null @@ -1,92 +0,0 @@ -using StardewModdingAPI; -using StardewValley; - -namespace TrainerMod.Framework.Commands.Player -{ - /// A command which edits a player style. - internal class SetStyleCommand : TrainerCommand - { - /********* - ** Public methods - *********/ - /// Construct an instance. - public SetStyleCommand() - : base("player_changestyle", "Sets the style of a player feature.\n\nUsage: player_changecolor .\n- target: what to change (one of 'hair', 'shirt', 'skin', 'acc', 'shoe', 'swim', or 'gender').\n- value: the integer style ID.") { } - - /// Handle the command. - /// Writes messages to the console and log file. - /// The command name. - /// The command arguments. - public override void Handle(IMonitor monitor, string command, ArgumentParser args) - { - // parse arguments - if (!args.TryGet(0, "target", out string target, oneOf: new[] { "hair", "shirt", "acc", "skin", "shoe", "swim", "gender" })) - return; - if (!args.TryGetInt(1, "style ID", out int styleID)) - return; - - // handle - switch (target) - { - case "hair": - Game1.player.changeHairStyle(styleID); - monitor.Log("OK, your hair style is updated.", LogLevel.Info); - break; - - case "shirt": - Game1.player.changeShirt(styleID); - monitor.Log("OK, your shirt style is updated.", LogLevel.Info); - break; - - case "acc": - Game1.player.changeAccessory(styleID); - monitor.Log("OK, your accessory style is updated.", LogLevel.Info); - break; - - case "skin": - Game1.player.changeSkinColor(styleID); - monitor.Log("OK, your skin color is updated.", LogLevel.Info); - break; - - case "shoe": - Game1.player.changeShoeColor(styleID); - monitor.Log("OK, your shoe style is updated.", LogLevel.Info); - break; - - case "swim": - switch (styleID) - { - case 0: - Game1.player.changeOutOfSwimSuit(); - monitor.Log("OK, you're no longer in your swimming suit.", LogLevel.Info); - break; - case 1: - Game1.player.changeIntoSwimsuit(); - monitor.Log("OK, you're now in your swimming suit.", LogLevel.Info); - break; - default: - this.LogUsageError(monitor, "The swim value should be 0 (no swimming suit) or 1 (swimming suit)."); - break; - } - break; - - case "gender": - switch (styleID) - { - case 0: - Game1.player.changeGender(true); - monitor.Log("OK, you're now male.", LogLevel.Info); - break; - case 1: - Game1.player.changeGender(false); - monitor.Log("OK, you're now female.", LogLevel.Info); - break; - default: - this.LogUsageError(monitor, "The gender value should be 0 (male) or 1 (female)."); - break; - } - break; - } - } - } -} -- cgit