From abd1fd14f55ddd0994b32e9da451a8436cf36c6f Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Fri, 17 Jun 2022 16:18:08 +0200 Subject: [PATCH] Add config to use default or owner collection for housing retainers. --- Penumbra/Configuration.cs | 1 + Penumbra/Interop/Resolver/PathResolver.Data.cs | 4 ++++ Penumbra/UI/ConfigWindow.SettingsTab.General.cs | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/Penumbra/Configuration.cs b/Penumbra/Configuration.cs index 8cb3e746..dfa22fd2 100644 --- a/Penumbra/Configuration.cs +++ b/Penumbra/Configuration.cs @@ -27,6 +27,7 @@ public partial class Configuration : IPluginConfiguration public bool UseCharacterCollectionInTryOn { get; set; } = true; public bool UseOwnerNameForCharacterCollection { get; set; } = true; public bool PreferNamedCollectionsOverOwners { get; set; } = true; + public bool UseDefaultCollectionForRetainers { get; set; } = false; #if DEBUG public bool DebugMode { get; set; } = true; diff --git a/Penumbra/Interop/Resolver/PathResolver.Data.cs b/Penumbra/Interop/Resolver/PathResolver.Data.cs index 00b92905..71cda6c5 100644 --- a/Penumbra/Interop/Resolver/PathResolver.Data.cs +++ b/Penumbra/Interop/Resolver/PathResolver.Data.cs @@ -271,6 +271,10 @@ public unsafe partial class PathResolver return Penumbra.CollectionManager.Default; } + // Housing Retainers + if( Penumbra.Config.UseDefaultCollectionForRetainers && gameObject->ObjectKind == (byte) ObjectKind.EventNpc && gameObject->DataID == 1011832 ) + return Penumbra.CollectionManager.Default; + string? actorName = null; if( Penumbra.Config.PreferNamedCollectionsOverOwners ) { diff --git a/Penumbra/UI/ConfigWindow.SettingsTab.General.cs b/Penumbra/UI/ConfigWindow.SettingsTab.General.cs index e69fa219..b545b1eb 100644 --- a/Penumbra/UI/ConfigWindow.SettingsTab.General.cs +++ b/Penumbra/UI/ConfigWindow.SettingsTab.General.cs @@ -75,6 +75,10 @@ public partial class ConfigWindow "If you have a character collection set to a specific name for a companion or combat pet, prefer this collection over the owner's collection.\n" + "That is, if you have a 'Topaz Carbuncle' collection, it will use this one instead of the one for its owner.", Penumbra.Config.PreferNamedCollectionsOverOwners, v => Penumbra.Config.PreferNamedCollectionsOverOwners = v ); + Checkbox( "Use Default Collection for Housing Retainers", + "Housing Retainers use the name of their owner instead of their own, you can decide to let them use their owners character collection or the default collection.\n" + + "It is not possible to make them have their own collection, since they have no connection to their actual name.", + Penumbra.Config.UseDefaultCollectionForRetainers, v => Penumbra.Config.UseDefaultCollectionForRetainers = v ); ImGui.Dummy( _window._defaultSpace ); DrawFolderSortType(); DrawAbsoluteSizeSelector();