Add option to not use any mods when inspecting players.

This commit is contained in:
Ottermandias 2023-01-06 16:03:45 +01:00
parent 72408bf45c
commit 28ab12c21b
3 changed files with 10 additions and 2 deletions

View file

@ -57,6 +57,11 @@ public unsafe partial class PathResolver
}
var identifier = Penumbra.Actors.FromObject( gameObject, out var owner, true, false );
if( Penumbra.Config.UseNoModsInInspect && identifier.Type == IdentifierType.Special && identifier.Special == SpecialActor.ExamineScreen )
{
return IdentifiedCache.Set( ModCollection.Empty, identifier, gameObject );
}
identifier = Penumbra.CollectionManager.Individuals.ConvertSpecialIdentifier( identifier );
var collection = CollectionByIdentifier( identifier )
?? CheckYourself( identifier, gameObject )
@ -77,8 +82,8 @@ public unsafe partial class PathResolver
// or the default collection if no player exists.
public static ModCollection PlayerCollection()
{
using var performance = Penumbra.Performance.Measure( PerformanceType.IdentifyCollection );
var gameObject = ( GameObject* )Dalamud.Objects.GetObjectAddress( 0 );
using var performance = Penumbra.Performance.Measure( PerformanceType.IdentifyCollection );
var gameObject = ( GameObject* )Dalamud.Objects.GetObjectAddress( 0 );
if( gameObject == null )
{
return Penumbra.CollectionManager.ByType( CollectionType.Yourself )