v1.0.3: Add /hsr command to open settings
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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/).
|
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
|
## [1.0.2] - 2025-02-03
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<Version>1.0.2.0</Version>
|
<Version>1.0.3.0</Version>
|
||||||
<Author>Knack117</Author>
|
<Author>Knack117</Author>
|
||||||
<Name>HSRTools</Name>
|
<Name>HSRTools</Name>
|
||||||
<InternalName>HSRTools</InternalName>
|
<InternalName>HSRTools</InternalName>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using Dalamud.Game.Command;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using HSRTools.Configuration;
|
using HSRTools.Configuration;
|
||||||
@@ -37,12 +38,17 @@ public sealed class HSRToolsPlugin : IDalamudPlugin
|
|||||||
|
|
||||||
PluginServices.PluginInterface.UiBuilder.Draw += OnDraw;
|
PluginServices.PluginInterface.UiBuilder.Draw += OnDraw;
|
||||||
PluginServices.PluginInterface.UiBuilder.OpenConfigUi += OpenConfigUi;
|
PluginServices.PluginInterface.UiBuilder.OpenConfigUi += OpenConfigUi;
|
||||||
|
PluginServices.CommandManager.AddHandler("/hsr", new CommandInfo(OnHsrCommand)
|
||||||
|
{
|
||||||
|
HelpMessage = "Open HSRTools settings.",
|
||||||
|
});
|
||||||
_chatMonitorService.SetConfiguration(_config);
|
_chatMonitorService.SetConfiguration(_config);
|
||||||
_chatMonitorService.Start();
|
_chatMonitorService.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
PluginServices.CommandManager.RemoveHandler("/hsr");
|
||||||
_chatMonitorService.Stop();
|
_chatMonitorService.Stop();
|
||||||
_windowSystem.RemoveAllWindows();
|
_windowSystem.RemoveAllWindows();
|
||||||
SaveConfig(_configDir, _config);
|
SaveConfig(_configDir, _config);
|
||||||
@@ -58,6 +64,11 @@ public sealed class HSRToolsPlugin : IDalamudPlugin
|
|||||||
_configWindow.IsOpen = true;
|
_configWindow.IsOpen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnHsrCommand(string command, string args)
|
||||||
|
{
|
||||||
|
OpenConfigUi();
|
||||||
|
}
|
||||||
|
|
||||||
private static HSRToolsConfiguration? LoadConfig(string configDir)
|
private static HSRToolsConfiguration? LoadConfig(string configDir)
|
||||||
{
|
{
|
||||||
var path = Path.Combine(configDir, ConfigFileName);
|
var path = Path.Combine(configDir, ConfigFileName);
|
||||||
|
|||||||
@@ -12,4 +12,5 @@ public sealed class PluginServices
|
|||||||
[PluginService] public static IPluginLog PluginLog { get; private set; } = null!;
|
[PluginService] public static IPluginLog PluginLog { get; private set; } = null!;
|
||||||
[PluginService] public static IDalamudPluginInterface PluginInterface { 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 IToastGui ToastGui { get; private set; } = null!;
|
||||||
|
[PluginService] public static ICommandManager CommandManager { get; private set; } = null!;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -5,15 +5,15 @@
|
|||||||
"Punchline": "Auto-invite to party when a trigger word is said in FC, LS, CWLS, or tells.",
|
"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).",
|
"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",
|
"InternalName": "HSRTools",
|
||||||
"AssemblyVersion": "1.0.2.0",
|
"AssemblyVersion": "1.0.3.0",
|
||||||
"RepoUrl": "https://github.com/Knack117/HSRTools",
|
"RepoUrl": "https://github.com/Knack117/HSRTools",
|
||||||
"ApplicableVersion": "any",
|
"ApplicableVersion": "any",
|
||||||
"DalamudApiLevel": 14,
|
"DalamudApiLevel": 14,
|
||||||
"Tags": [ "chat", "party", "invite", "automation" ],
|
"Tags": [ "chat", "party", "invite", "automation" ],
|
||||||
"AcceptsFeedback": true,
|
"AcceptsFeedback": true,
|
||||||
"DownloadCount": 0,
|
"DownloadCount": 0,
|
||||||
"LastUpdate": "1738713600",
|
"LastUpdate": "1738800000",
|
||||||
"DownloadLinkInstall": "https://github.com/Knack117/HSRTools/releases/download/v1.0.2/HSRTools.zip",
|
"DownloadLinkInstall": "https://github.com/Knack117/HSRTools/releases/download/v1.0.3/HSRTools.zip",
|
||||||
"DownloadLinkUpdate": "https://github.com/Knack117/HSRTools/releases/download/v1.0.2/HSRTools.zip"
|
"DownloadLinkUpdate": "https://github.com/Knack117/HSRTools/releases/download/v1.0.3/HSRTools.zip"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user