diff --git a/Penumbra/Mods/CollectionManager.cs b/Penumbra/Mods/CollectionManager.cs index 960d6b0c..9e617746 100644 --- a/Penumbra/Mods/CollectionManager.cs +++ b/Penumbra/Mods/CollectionManager.cs @@ -14,7 +14,7 @@ namespace Penumbra.Mods { private readonly ModManager _manager; - public string CollectionChangedTo { get; private set; }= string.Empty; + public string CollectionChangedTo { get; private set; } = string.Empty; public Dictionary< string, ModCollection > Collections { get; } = new(); public ModCollection CurrentCollection { get; private set; } = null!; @@ -43,11 +43,11 @@ namespace Penumbra.Mods if( ActiveCollection.Cache?.MetaManipulations.Count > 0 || newActive.Cache?.MetaManipulations.Count > 0 ) { - var resourceManager = Service.Get(); + var resourceManager = Service< ResidentResources >.Get(); resourceManager.ReloadPlayerResources(); } - ActiveCollection = newActive; + ActiveCollection = newActive; return true; } diff --git a/Penumbra/Mods/ModCollectionCache.cs b/Penumbra/Mods/ModCollectionCache.cs index 6c8ae654..9914553a 100644 --- a/Penumbra/Mods/ModCollectionCache.cs +++ b/Penumbra/Mods/ModCollectionCache.cs @@ -192,7 +192,7 @@ namespace Penumbra.Mods } else { - MissingFiles.Add( file ); + MissingFiles.Add( file ); } } } diff --git a/Penumbra/Mods/ModManager.cs b/Penumbra/Mods/ModManager.cs index a2d23169..4a42d7b6 100644 --- a/Penumbra/Mods/ModManager.cs +++ b/Penumbra/Mods/ModManager.cs @@ -35,7 +35,7 @@ namespace Penumbra.Mods private void ClearOldTmpDir() { - if (!TempWritable) + if( !TempWritable ) { return; } diff --git a/Penumbra/UI/MenuTabs/TabCollections.cs b/Penumbra/UI/MenuTabs/TabCollections.cs index 56a70aa9..898f24e7 100644 --- a/Penumbra/UI/MenuTabs/TabCollections.cs +++ b/Penumbra/UI/MenuTabs/TabCollections.cs @@ -88,7 +88,7 @@ namespace Penumbra.UI if( _manager.Collections.AddCollection( _newCollectionName, settings ) ) { UpdateNames(); - SetCurrentCollection( _manager.Collections.Collections[_newCollectionName], true ); + SetCurrentCollection( _manager.Collections.Collections[ _newCollectionName ], true ); } _newCollectionName = string.Empty; @@ -100,10 +100,11 @@ namespace Penumbra.UI { var changes = ModFunctions.CleanUpCollection( _manager.Collections.CurrentCollection.Settings, _manager.BasePath.EnumerateDirectories() ); - _manager.Collections.CurrentCollection.UpdateSettings( forceSave: changes ); + _manager.Collections.CurrentCollection.UpdateSettings( changes ); } - ImGuiCustom.HoverTooltip( "Remove all stored settings for mods not currently available and fix invalid settings.\nUse at own risk." ); + ImGuiCustom.HoverTooltip( + "Remove all stored settings for mods not currently available and fix invalid settings.\nUse at own risk." ); } private void DrawNewCollectionInput() @@ -128,7 +129,7 @@ namespace Penumbra.UI var deleteCondition = _manager.Collections.Collections.Count > 1 && _manager.Collections.CurrentCollection.Name != ModCollection.DefaultCollection; ImGui.SameLine(); - if( ImGuiCustom.DisableButton( "Delete Current Collection", deleteCondition) ) + if( ImGuiCustom.DisableButton( "Delete Current Collection", deleteCondition ) ) { _manager.Collections.RemoveCollection( _manager.Collections.CurrentCollection.Name ); SetCurrentCollection( _manager.Collections.CurrentCollection, true ); @@ -149,7 +150,7 @@ namespace Penumbra.UI return; } - _manager.Collections.SetCurrentCollection( _collections[idx + 1] ); + _manager.Collections.SetCurrentCollection( _collections[ idx + 1 ] ); _currentCollectionIndex = idx; _selector.Cache.TriggerListReset(); if( _selector.Mod != null ) @@ -223,7 +224,7 @@ namespace Penumbra.UI ImGui.InputTextWithHint( "##New Character", "New Character Name", ref _newCharacterName, 32 ); ImGui.SameLine(); - if( ImGuiCustom.DisableButton( "Create New Character Collection", _newCharacterName.Length > 0 )) + if( ImGuiCustom.DisableButton( "Create New Character Collection", _newCharacterName.Length > 0 ) ) { _manager.Collections.CreateCharacterCollection( _newCharacterName ); _currentCharacterIndices[ _newCharacterName ] = 0; diff --git a/Penumbra/UI/MenuTabs/TabDebug.cs b/Penumbra/UI/MenuTabs/TabDebug.cs index 924c1c30..baf36b5b 100644 --- a/Penumbra/UI/MenuTabs/TabDebug.cs +++ b/Penumbra/UI/MenuTabs/TabDebug.cs @@ -349,9 +349,9 @@ namespace Penumbra.UI return; } - var manager = Service.Get(); + var manager = Service< ModManager >.Get(); var cache = manager.Collections.CurrentCollection.Cache; - if( cache == null || !ImGui.BeginTable( "##MissingFilesDebugList", 1, ImGuiTableFlags.RowBg, -Vector2.UnitX)) + if( cache == null || !ImGui.BeginTable( "##MissingFilesDebugList", 1, ImGuiTableFlags.RowBg, -Vector2.UnitX ) ) { return; } @@ -366,6 +366,7 @@ namespace Penumbra.UI { ImGui.SetClipboardText( file.FullName ); } + ImGuiCustom.HoverTooltip( "Click to copy to clipboard." ); } } diff --git a/Penumbra/Util/GeneralUtil.cs b/Penumbra/Util/GeneralUtil.cs index f0a2e83a..698609db 100644 --- a/Penumbra/Util/GeneralUtil.cs +++ b/Penumbra/Util/GeneralUtil.cs @@ -8,7 +8,7 @@ namespace Penumbra.Util public static void PrintDebugAddress( string name, IntPtr address ) { var module = Dalamud.SigScanner.Module.BaseAddress.ToInt64(); - PluginLog.Debug( "{Name} found at 0x{Address:X16}, +0x{Offset}", name, address.ToInt64(), address.ToInt64() - module ); + PluginLog.Debug( "{Name} found at 0x{Address:X16}, +0x{Offset:X}", name, address.ToInt64(), address.ToInt64() - module ); } } } \ No newline at end of file