diff --git a/CHANGELOG.md b/CHANGELOG.md index 0632cbb..de33be6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.0.3] - 2025-02-03 + +### Added + +- `/hsr` chat command to open HSRTools settings. + ## [1.0.2] - 2025-02-03 ### Added diff --git a/HSRTools/HSRTools.csproj b/HSRTools/HSRTools.csproj index 68c92d1..792d55c 100644 --- a/HSRTools/HSRTools.csproj +++ b/HSRTools/HSRTools.csproj @@ -1,7 +1,7 @@ true - 1.0.2.0 + 1.0.3.0 Knack117 HSRTools HSRTools diff --git a/HSRTools/Plugin.cs b/HSRTools/Plugin.cs index 156c347..d38f515 100644 --- a/HSRTools/Plugin.cs +++ b/HSRTools/Plugin.cs @@ -1,5 +1,6 @@ using System.IO; using System.Text.Json; +using Dalamud.Game.Command; using Dalamud.Interface.Windowing; using Dalamud.Plugin; using HSRTools.Configuration; @@ -37,12 +38,17 @@ public sealed class HSRToolsPlugin : IDalamudPlugin PluginServices.PluginInterface.UiBuilder.Draw += OnDraw; PluginServices.PluginInterface.UiBuilder.OpenConfigUi += OpenConfigUi; + PluginServices.CommandManager.AddHandler("/hsr", new CommandInfo(OnHsrCommand) + { + HelpMessage = "Open HSRTools settings.", + }); _chatMonitorService.SetConfiguration(_config); _chatMonitorService.Start(); } public void Dispose() { + PluginServices.CommandManager.RemoveHandler("/hsr"); _chatMonitorService.Stop(); _windowSystem.RemoveAllWindows(); SaveConfig(_configDir, _config); @@ -58,6 +64,11 @@ public sealed class HSRToolsPlugin : IDalamudPlugin _configWindow.IsOpen = true; } + private void OnHsrCommand(string command, string args) + { + OpenConfigUi(); + } + private static HSRToolsConfiguration? LoadConfig(string configDir) { var path = Path.Combine(configDir, ConfigFileName); diff --git a/HSRTools/Services/PluginServices.cs b/HSRTools/Services/PluginServices.cs index 584a7aa..679604b 100644 --- a/HSRTools/Services/PluginServices.cs +++ b/HSRTools/Services/PluginServices.cs @@ -12,4 +12,5 @@ public sealed class PluginServices [PluginService] public static IPluginLog PluginLog { get; private set; } = null!; [PluginService] public static IDalamudPluginInterface PluginInterface { get; private set; } = null!; [PluginService] public static IToastGui ToastGui { get; private set; } = null!; + [PluginService] public static ICommandManager CommandManager { get; private set; } = null!; } diff --git a/pluginmaster.json b/pluginmaster.json index 387e653..647e4c1 100644 --- a/pluginmaster.json +++ b/pluginmaster.json @@ -5,15 +5,15 @@ "Punchline": "Auto-invite to party when a trigger word is said in FC, LS, CWLS, or tells.", "Description": "Detects a user-defined trigger word in Free Company, Link Shell, Cross-World Link Shell, and tell chat, then invites the sender to your party. Works for same-world and cross-world (CWLS).", "InternalName": "HSRTools", - "AssemblyVersion": "1.0.2.0", + "AssemblyVersion": "1.0.3.0", "RepoUrl": "https://github.com/Knack117/HSRTools", "ApplicableVersion": "any", "DalamudApiLevel": 14, "Tags": [ "chat", "party", "invite", "automation" ], "AcceptsFeedback": true, "DownloadCount": 0, - "LastUpdate": "1738713600", - "DownloadLinkInstall": "https://github.com/Knack117/HSRTools/releases/download/v1.0.2/HSRTools.zip", - "DownloadLinkUpdate": "https://github.com/Knack117/HSRTools/releases/download/v1.0.2/HSRTools.zip" + "LastUpdate": "1738800000", + "DownloadLinkInstall": "https://github.com/Knack117/HSRTools/releases/download/v1.0.3/HSRTools.zip", + "DownloadLinkUpdate": "https://github.com/Knack117/HSRTools/releases/download/v1.0.3/HSRTools.zip" } ]