internal void SetupCommands(ICommandHelper consoleCommands) { if (!this.npcAdventureMod.Config.EnableDebug) { return; } consoleCommands.Add("npcadventure_eligible", "Make player eligible to recruit a companion (server or singleplayer only)", this.Eligible); consoleCommands.Add("npcadventure_recruit", "Recruit an NPC as companion (server or singleplayer only)", this.Recruit); consoleCommands.Add("npcadventure_patches", "List harmony patches applied by NPC Adventures\n\nUsage: npcadventure_patches [recheck]\n\n- recheck - Recheck conflictiong patches", this.GetPatches); consoleCommands.Add("npcadventure_debug", "Set a debug flag\n\nUsage: npcadventure_debug set|unset|list <flagName>", this.SetDebugFlag); this.monitor.Log("Registered debug commands", LogLevel.Info); }
internal void SetupCommands(ICommandHelper consoleCommands) { if (!this.npcAdventureMod.Config.EnableDebug) { return; } consoleCommands.Add("npcadventure_eligible", "Make player eligible to recruit a companion (server or singleplayer only)", this.Eligible); this.monitor.Log("Registered debug commands", LogLevel.Info); }
/// <summary>Adds this command to SMAPI.</summary> public override void Register(ICommandHelper helper) { helper.Add("listen", "Toggles displaying console output in the in game chat box.", this.Handle); }
/// <summary> /// Adds this command to SMAPI. /// </summary> public override void Register(ICommandHelper helper) { helper.Add("w", "Send a message to only one player. Only works from the chat box.\n" + "Usage: /w <name> <message>", (name, args) => this.Monitor.Log("This command only works from the chat box.", LogLevel.Error)); }
/// <summary> /// Registers a command with the SMAPI console. /// </summary> private void RegisterCommand(ICommandHelper helper) { Logger.LogInformation($"Registering {Name} command..."); helper.Add(Name, Description, (name, args) => Apply(args)); Logger.LogInformation($"{Name} command registered."); }
/// <summary>Register the root command with SMAPI.</summary> /// <param name="commandHelper">SMAPI's command API.</param> public void RegisterWith(ICommandHelper commandHelper) { commandHelper.Add(this.RootName, $"Starts a {this.ModName} command. Type '{this.RootName} {GenericHelpCommand.CommandName}' for details.", (_, args) => this.Handle(args)); }
/// <summary>Adds this command to SMAPI.</summary> public override void Register(ICommandHelper helper) { helper.Add("r", "Replies to the last whisper you were sent. Only works from the chat box.\n" + "Usage: /r <message>", (name, args) => this.Monitor.Log("This command only works from the chat box.", LogLevel.Error)); }