mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Rework API/IPC and use new Penumbra IPC.
This commit is contained in:
parent
9f276c7674
commit
0268546f63
46 changed files with 2270 additions and 1233 deletions
|
|
@ -10,6 +10,7 @@ using Glamourer.State;
|
|||
using ImGuiNET;
|
||||
using OtterGui;
|
||||
using OtterGui.Classes;
|
||||
using OtterGui.Services;
|
||||
using Penumbra.GameData.Actors;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.GameData.Interop;
|
||||
|
|
@ -18,7 +19,7 @@ using ObjectManager = Glamourer.Interop.ObjectManager;
|
|||
|
||||
namespace Glamourer.Services;
|
||||
|
||||
public class CommandService : IDisposable
|
||||
public class CommandService : IDisposable, IApiService
|
||||
{
|
||||
private const string RandomString = "random";
|
||||
private const string MainCommandString = "/glamourer";
|
||||
|
|
@ -118,7 +119,7 @@ public class CommandService : IDisposable
|
|||
"apply" => Apply(argument),
|
||||
"reapply" => ReapplyState(argument),
|
||||
"revert" => Revert(argument),
|
||||
"reapplyautomation" => ReapplyAutomation(argument, "reapplyautomation", false),
|
||||
"reapplyautomation" => ReapplyAutomation(argument, "reapplyautomation", false),
|
||||
"reverttoautomation" => ReapplyAutomation(argument, "reverttoautomation", true),
|
||||
"automation" => SetAutomation(argument),
|
||||
"copy" => CopyState(argument),
|
||||
|
|
@ -534,14 +535,14 @@ public class CommandService : IDisposable
|
|||
if (!applyMods || design is not Design d)
|
||||
return;
|
||||
|
||||
var (messages, appliedMods, collection, overridden) = _modApplier.ApplyModSettings(d.AssociatedMods, actor);
|
||||
var (messages, appliedMods, collection, name, overridden) = _modApplier.ApplyModSettings(d.AssociatedMods, actor);
|
||||
|
||||
foreach (var message in messages)
|
||||
Glamourer.Messager.Chat.Print($"Error applying mod settings: {message}");
|
||||
|
||||
if (appliedMods > 0)
|
||||
Glamourer.Messager.Chat.Print(
|
||||
$"Applied {appliedMods} mod settings to {collection}{(overridden ? " (overridden by settings)" : string.Empty)}.");
|
||||
$"Applied {appliedMods} mod settings to {name}{(overridden ? " (overridden by settings)" : string.Empty)}.");
|
||||
}
|
||||
|
||||
private bool Delete(string argument)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue