diff --git a/Glamourer/Automation/AutoDesignManager.cs b/Glamourer/Automation/AutoDesignManager.cs index bdccb1c..a69a264 100644 --- a/Glamourer/Automation/AutoDesignManager.cs +++ b/Glamourer/Automation/AutoDesignManager.cs @@ -234,7 +234,8 @@ public class AutoDesignManager : ISavable, IReadOnlyList }; set.Designs.Add(newDesign); Save(); - Glamourer.Log.Debug($"Added new associated design {design?.Identifier.ToString() ?? "Reverter"} as design {set.Designs.Count} to design set."); + Glamourer.Log.Debug( + $"Added new associated design {design?.Identifier.ToString() ?? "Reverter"} as design {set.Designs.Count} to design set."); _event.Invoke(AutomationChanged.Type.AddedDesign, set, set.Designs.Count - 1); } @@ -387,7 +388,7 @@ public class AutoDesignManager : ISavable, IReadOnlyList continue; } - var set = new AutoDesignSet(name, id) + var set = new AutoDesignSet(name, group) { Enabled = obj["Enabled"]?.ToObject() ?? false, BaseState = obj["BaseState"]?.ToObject() ?? AutoDesignSet.Base.Current, @@ -449,6 +450,7 @@ public class AutoDesignManager : ISavable, IReadOnlyList return null; } } + var applicationType = (AutoDesign.Type)(jObj["ApplicationType"]?.ToObject() ?? 0); var ret = new AutoDesign() @@ -526,7 +528,10 @@ public class AutoDesignManager : ISavable, IReadOnlyList }, IdentifierType.Retainer => new[] { - identifier.CreatePermanent(), + _actors.AwaitedService.CreateRetainer(identifier.PlayerName, + identifier.Retainer == ActorIdentifier.RetainerType.Mannequin + ? ActorIdentifier.RetainerType.Mannequin + : ActorIdentifier.RetainerType.Bell).CreatePermanent(), }, IdentifierType.Npc => CreateNpcs(_actors.AwaitedService, identifier), _ => Array.Empty(), diff --git a/Glamourer/Gui/Tabs/AutomationTab/IdentifierDrawer.cs b/Glamourer/Gui/Tabs/AutomationTab/IdentifierDrawer.cs index 9d087eb..b3a6576 100644 --- a/Glamourer/Gui/Tabs/AutomationTab/IdentifierDrawer.cs +++ b/Glamourer/Gui/Tabs/AutomationTab/IdentifierDrawer.cs @@ -16,9 +16,10 @@ public class IdentifierDrawer private string _characterName = string.Empty; - public ActorIdentifier NpcIdentifier { get; private set; } = ActorIdentifier.Invalid; - public ActorIdentifier PlayerIdentifier { get; private set; } = ActorIdentifier.Invalid; - public ActorIdentifier RetainerIdentifier { get; private set; } = ActorIdentifier.Invalid; + public ActorIdentifier NpcIdentifier { get; private set; } = ActorIdentifier.Invalid; + public ActorIdentifier PlayerIdentifier { get; private set; } = ActorIdentifier.Invalid; + public ActorIdentifier RetainerIdentifier { get; private set; } = ActorIdentifier.Invalid; + public ActorIdentifier MannequinIdentifier { get; private set; } = ActorIdentifier.Invalid; public IdentifierDrawer(ActorService actors, IdentifierService identifier, HumanModelList humans) { @@ -52,6 +53,9 @@ public class IdentifierDrawer public bool CanSetRetainer => RetainerIdentifier.IsValid; + public bool CanSetMannequin + => MannequinIdentifier.IsValid; + public bool CanSetNpc => NpcIdentifier.IsValid; @@ -59,8 +63,9 @@ public class IdentifierDrawer { if (ByteString.FromString(_characterName, out var byteName)) { - PlayerIdentifier = _actors.AwaitedService.CreatePlayer(byteName, _worldCombo.CurrentSelection.Key); - RetainerIdentifier = _actors.AwaitedService.CreateRetainer(byteName, ActorIdentifier.RetainerType.Both); + PlayerIdentifier = _actors.AwaitedService.CreatePlayer(byteName, _worldCombo.CurrentSelection.Key); + RetainerIdentifier = _actors.AwaitedService.CreateRetainer(byteName, ActorIdentifier.RetainerType.Bell); + MannequinIdentifier = _actors.AwaitedService.CreateRetainer(byteName, ActorIdentifier.RetainerType.Mannequin); } NpcIdentifier = _humanNpcCombo.CurrentSelection.Kind is ObjectKind.EventNpc or ObjectKind.BattleNpc diff --git a/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs b/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs index 60d37e2..d182bc7 100644 --- a/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs +++ b/Glamourer/Gui/Tabs/AutomationTab/SetPanel.cs @@ -320,14 +320,17 @@ public class SetPanel _identifierDrawer.DrawWorld(200); _identifierDrawer.DrawName(300); _identifierDrawer.DrawNpcs(300); - if (ImGuiUtil.DrawDisabledButton("Set to Retainer", new Vector2(100, 0), string.Empty, !_identifierDrawer.CanSetRetainer)) - _manager.ChangeIdentifier(setIndex, _identifierDrawer.RetainerIdentifier); - ImGui.SameLine(); - if (ImGuiUtil.DrawDisabledButton("Set to Character", new Vector2(100, 0), string.Empty, !_identifierDrawer.CanSetPlayer)) + if (ImGuiUtil.DrawDisabledButton("Set to Character", Vector2.Zero, string.Empty, !_identifierDrawer.CanSetPlayer)) _manager.ChangeIdentifier(setIndex, _identifierDrawer.PlayerIdentifier); ImGui.SameLine(); - if (ImGuiUtil.DrawDisabledButton("Set to Npc", new Vector2(100, 0), string.Empty, !_identifierDrawer.CanSetNpc)) + if (ImGuiUtil.DrawDisabledButton("Set to Npc", Vector2.Zero, string.Empty, !_identifierDrawer.CanSetNpc)) _manager.ChangeIdentifier(setIndex, _identifierDrawer.NpcIdentifier); + ImGui.SameLine(); + if (ImGuiUtil.DrawDisabledButton("Set to Retainer", Vector2.Zero, string.Empty, !_identifierDrawer.CanSetRetainer)) + _manager.ChangeIdentifier(setIndex, _identifierDrawer.RetainerIdentifier); + ImGui.SameLine(); + if (ImGuiUtil.DrawDisabledButton("Set to Mannequin", Vector2.Zero, string.Empty, !_identifierDrawer.CanSetRetainer)) + _manager.ChangeIdentifier(setIndex, _identifierDrawer.MannequinIdentifier); } diff --git a/Penumbra.GameData b/Penumbra.GameData index 98bd4e9..f306da6 160000 --- a/Penumbra.GameData +++ b/Penumbra.GameData @@ -1 +1 @@ -Subproject commit 98bd4e9946ded20cb5d54182883e73f344fe2d26 +Subproject commit f306da6f43e8681d3bace45cbd4fd98ef49927ca