mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-01-03 06:13:45 +01:00
Implements true endpoints for all glamourer operations, also correctly marks reverts and gearsets. Replaced back excessive logging to maintain with logging formats expected by glamourer.
This commit is contained in:
parent
c605d19510
commit
e1a41b5f3c
21 changed files with 225 additions and 99 deletions
|
|
@ -385,7 +385,7 @@ public class ActorPanel
|
|||
{
|
||||
if (ImGuiUtil.DrawDisabledButton("Revert to Game", Vector2.Zero, "Revert the character to its actual state in the game.",
|
||||
_state!.IsLocked))
|
||||
_stateManager.ResetState(_state!, StateSource.Manual);
|
||||
_stateManager.ResetState(_state!, StateSource.Manual, stateUpdate: true);
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ public class ActorPanel
|
|||
!_config.EnableAutoDesigns || _state!.IsLocked))
|
||||
{
|
||||
_autoDesignApplier.ReapplyAutomation(_actor, _identifier, _state!, false, out var forcedRedraw);
|
||||
_stateManager.ReapplyState(_actor, forcedRedraw, StateSource.Manual);
|
||||
_stateManager.ReapplyAutomationState(_actor, forcedRedraw, false, StateSource.Manual);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
|
|
@ -403,14 +403,14 @@ public class ActorPanel
|
|||
!_config.EnableAutoDesigns || _state!.IsLocked))
|
||||
{
|
||||
_autoDesignApplier.ReapplyAutomation(_actor, _identifier, _state!, true, out var forcedRedraw);
|
||||
_stateManager.ReapplyState(_actor, forcedRedraw, StateSource.Manual);
|
||||
_stateManager.ReapplyAutomationState(_actor, forcedRedraw, true, StateSource.Manual);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
if (ImGuiUtil.DrawDisabledButton("Reapply", Vector2.Zero,
|
||||
"Try to reapply the configured state if something went wrong. Should generally not be necessary.",
|
||||
_state!.IsLocked))
|
||||
_stateManager.ReapplyState(_actor, false, StateSource.Manual);
|
||||
_stateManager.ReapplyState(_actor, false, StateSource.Manual, true);
|
||||
}
|
||||
|
||||
private void DrawApplyToSelf()
|
||||
|
|
@ -423,7 +423,7 @@ public class ActorPanel
|
|||
|
||||
if (_stateManager.GetOrCreate(id, data.Objects[0], out var state))
|
||||
_stateManager.ApplyDesign(state, _converter.Convert(_state!, ApplicationRules.FromModifiers(_state!)),
|
||||
ApplySettings.Manual);
|
||||
ApplySettings.Manual with { SendStateUpdate = true });
|
||||
}
|
||||
|
||||
private void DrawApplyToTarget()
|
||||
|
|
@ -440,7 +440,7 @@ public class ActorPanel
|
|||
|
||||
if (_stateManager.GetOrCreate(id, data.Objects[0], out var state))
|
||||
_stateManager.ApplyDesign(state, _converter.Convert(_state!, ApplicationRules.FromModifiers(_state!)),
|
||||
ApplySettings.Manual);
|
||||
ApplySettings.Manual with { SendStateUpdate = true });
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ public class ActorPanel
|
|||
var text = ImGui.GetClipboardText();
|
||||
var design = panel._converter.FromBase64(text, applyCustomize, applyGear, out _)
|
||||
?? throw new Exception("The clipboard did not contain valid data.");
|
||||
panel._stateManager.ApplyDesign(panel._state!, design, ApplySettings.ManualWithLinks);
|
||||
panel._stateManager.ApplyDesign(panel._state!, design, ApplySettings.ManualWithLinks with { SendStateUpdate = true });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue