feat: add help for commands

This commit is contained in:
Anna 2021-05-31 20:46:11 -04:00
parent c8780e2e12
commit b790ccb7ca
3 changed files with 9 additions and 3 deletions

View File

@ -8,7 +8,9 @@ namespace RoleplayersToolbox {
internal Commands(Plugin plugin) {
this.Plugin = plugin;
this.Plugin.Interface.CommandManager.AddHandler("/rptools", new CommandInfo(this.OnCommand));
this.Plugin.Interface.CommandManager.AddHandler("/rptools", new CommandInfo(this.OnCommand) {
HelpMessage = "Open The Roleplayer's Toolbox",
});
}
public void Dispose() {

View File

@ -79,7 +79,9 @@ namespace RoleplayersToolbox.Tools.Housing {
this.Plugin.Common.Functions.ContextMenu.OpenContextMenu += this.OnContextMenu;
this.Plugin.Interface.Framework.OnUpdateEvent += this.OnFramework;
this.Plugin.Interface.CommandManager.AddHandler("/route", new CommandInfo(this.OnCommand));
this.Plugin.Interface.CommandManager.AddHandler("/route", new CommandInfo(this.OnCommand) {
HelpMessage = "Extract housing information from the given text and open the routing window",
});
}
public void Dispose() {

View File

@ -32,7 +32,9 @@ namespace RoleplayersToolbox.Tools.Illegal.Emote {
internal EmoteTool(Plugin plugin) {
this.Plugin = plugin;
this.Plugin.Interface.CommandManager.AddHandler("/emoteid", new CommandInfo(this.EmoteIdCommand));
this.Plugin.Interface.CommandManager.AddHandler("/emoteid", new CommandInfo(this.EmoteIdCommand) {
HelpMessage = "Run the emote with the given ID if it is unlocked",
});
if (this.Plugin.Interface.TargetModuleScanner.TryScanText(Signatures.SetActionOnHotbar, out var setPtr)) {
this.SetActionOnHotbarHook = new Hook<SetActionOnHotbarDelegate>(setPtr, new SetActionOnHotbarDelegate(this.SetActionOnHotbarDetour));