mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-24 13:41:49 +01:00
feat: add /xlversion command
This commit is contained in:
parent
264cf58a8f
commit
64cb19cb93
2 changed files with 26 additions and 4 deletions
|
|
@ -8,7 +8,9 @@ using Dalamud.Configuration.Internal;
|
|||
using Dalamud.Game;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Game.Gui;
|
||||
using Dalamud.Game.Text.SeStringHandling;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Utility;
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Interface.Internal
|
||||
|
|
@ -124,6 +126,11 @@ namespace Dalamud.Interface.Internal
|
|||
"Change various In-Game-Addon settings like chat channels and the discord bot setup."),
|
||||
});
|
||||
|
||||
commandManager.AddHandler("/xlversion", new CommandInfo(this.OnDebugImInfoCommand)
|
||||
{
|
||||
HelpMessage = "Dalamud version info",
|
||||
});
|
||||
|
||||
commandManager.AddHandler("/imdebug", new CommandInfo(this.OnDebugImInfoCommand)
|
||||
{
|
||||
HelpMessage = "ImGui DEBUG",
|
||||
|
|
@ -306,6 +313,21 @@ namespace Dalamud.Interface.Internal
|
|||
Log.Information(info);
|
||||
}
|
||||
|
||||
private void OnVersionInfo(string command, string arguments)
|
||||
{
|
||||
var chatGui = Service<ChatGui>.Get();
|
||||
|
||||
chatGui.Print(new SeStringBuilder()
|
||||
.AddItalics("Dalamud:")
|
||||
.AddText($" D{Util.AssemblyVersion}({Util.GetGitHash()}")
|
||||
.Build());
|
||||
|
||||
chatGui.Print(new SeStringBuilder()
|
||||
.AddItalics("FFXIVCS:")
|
||||
.AddText($" {Util.GetGitHashClientStructs()}")
|
||||
.Build());
|
||||
}
|
||||
|
||||
private void OnOpenInstallerCommand(string command, string arguments)
|
||||
{
|
||||
Service<DalamudInterface>.Get().TogglePluginInstallerWindow();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue