Merge branch 'master' into services

# Conflicts:
#	Penumbra/CommandHandler.cs
#	Penumbra/Penumbra.cs
This commit is contained in:
Ottermandias 2023-03-25 16:58:33 +01:00
commit e33f49e097
2 changed files with 14 additions and 13 deletions

View file

@ -1,6 +1,7 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Dalamud.Game;
using Dalamud.Game.Command; using Dalamud.Game.Command;
using Dalamud.Game.Gui; using Dalamud.Game.Gui;
using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling;
@ -8,7 +9,6 @@ using ImGuiNET;
using Penumbra.Api.Enums; using Penumbra.Api.Enums;
using Penumbra.Collections; using Penumbra.Collections;
using Penumbra.GameData.Actors; using Penumbra.GameData.Actors;
using Penumbra.Interop;
using Penumbra.Interop.Services; using Penumbra.Interop.Services;
using Penumbra.Mods; using Penumbra.Mods;
using Penumbra.Services; using Penumbra.Services;
@ -31,7 +31,7 @@ public class CommandHandler : IDisposable
private readonly ModCollection.Manager _collectionManager; private readonly ModCollection.Manager _collectionManager;
private readonly Penumbra _penumbra; private readonly Penumbra _penumbra;
public CommandHandler(CommandManager commandManager, ChatGui chat, RedrawService redrawService, Configuration config, public CommandHandler(Framework framework, CommandManager commandManager, ChatGui chat, RedrawService redrawService, Configuration config,
ConfigWindow configWindow, Mod.Manager modManager, ModCollection.Manager collectionManager, ActorService actors, Penumbra penumbra) ConfigWindow configWindow, Mod.Manager modManager, ModCollection.Manager collectionManager, ActorService actors, Penumbra penumbra)
{ {
_commandManager = commandManager; _commandManager = commandManager;
@ -43,17 +43,18 @@ public class CommandHandler : IDisposable
_actors = actors.AwaitedService; _actors = actors.AwaitedService;
_chat = chat; _chat = chat;
_penumbra = penumbra; _penumbra = penumbra;
framework.RunOnFrameworkThread(() =>
{
_commandManager.AddHandler(CommandName, new CommandInfo(OnCommand) _commandManager.AddHandler(CommandName, new CommandInfo(OnCommand)
{ {
HelpMessage = "Without arguments, toggles the main window. Use /penumbra help to get further command help.", HelpMessage = "Without arguments, toggles the main window. Use /penumbra help to get further command help.",
ShowInHelp = true, ShowInHelp = true,
}); });
});
} }
public void Dispose() public void Dispose()
{ => _commandManager.RemoveHandler(CommandName);
_commandManager.RemoveHandler(CommandName);
}
private void OnCommand(string command, string arguments) private void OnCommand(string command, string arguments)
{ {

View file

@ -4,8 +4,8 @@
"Name": "Penumbra", "Name": "Penumbra",
"Description": "Runtime mod loader and manager.", "Description": "Runtime mod loader and manager.",
"InternalName": "Penumbra", "InternalName": "Penumbra",
"AssemblyVersion": "0.6.6.3", "AssemblyVersion": "0.6.6.4",
"TestingAssemblyVersion": "0.6.6.3", "TestingAssemblyVersion": "0.6.6.4",
"RepoUrl": "https://github.com/xivdev/Penumbra", "RepoUrl": "https://github.com/xivdev/Penumbra",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"DalamudApiLevel": 8, "DalamudApiLevel": 8,
@ -16,9 +16,9 @@
"LoadPriority": 69420, "LoadPriority": 69420,
"LoadRequiredState": 2, "LoadRequiredState": 2,
"LoadSync": true, "LoadSync": true,
"DownloadLinkInstall": "https://github.com/xivdev/Penumbra/releases/download/0.6.6.3/Penumbra.zip", "DownloadLinkInstall": "https://github.com/xivdev/Penumbra/releases/download/0.6.6.4/Penumbra.zip",
"DownloadLinkTesting": "https://github.com/xivdev/Penumbra/releases/download/0.6.6.3/Penumbra.zip", "DownloadLinkTesting": "https://github.com/xivdev/Penumbra/releases/download/0.6.6.4/Penumbra.zip",
"DownloadLinkUpdate": "https://github.com/xivdev/Penumbra/releases/download/0.6.6.3/Penumbra.zip", "DownloadLinkUpdate": "https://github.com/xivdev/Penumbra/releases/download/0.6.6.4/Penumbra.zip",
"IconUrl": "https://raw.githubusercontent.com/xivdev/Penumbra/master/images/icon.png" "IconUrl": "https://raw.githubusercontent.com/xivdev/Penumbra/master/images/icon.png"
} }
] ]