Fix an issue with retainer assignments using ownership wrongly for mannequins.

This commit is contained in:
Ottermandias 2023-03-01 23:11:05 +01:00
parent e62b0155d4
commit c2ac745d72
7 changed files with 23 additions and 13 deletions

View file

@ -41,7 +41,7 @@ public sealed partial class IndividualCollections : IReadOnlyList< (string Displ
return true;
}
if( Penumbra.Config.UseOwnerNameForCharacterCollection )
if( identifier.Retainer is not ActorIdentifier.RetainerType.Mannequin && Penumbra.Config.UseOwnerNameForCharacterCollection )
{
return CheckWorlds( _actorManager.GetCurrentPlayer(), out collection );
}

View file

@ -70,7 +70,7 @@ public sealed partial class IndividualCollections
return AddResult.Invalid;
}
identifiers = new[] { _actorManager.CreateRetainer( retainerName ) };
identifiers = new[] { _actorManager.CreateRetainer( retainerName, 0 ) };
break;
case IdentifierType.Owned:
if( !ByteString.FromString( name, out var ownerName ) )

View file

@ -175,7 +175,7 @@ public partial class ModEditWindow
}
private static T? DefaultParseFile( byte[] bytes )
=> Activator.CreateInstance( typeof( T ), BindingFlags.CreateInstance | BindingFlags.OptionalParamBinding, bytes ) as T;
=> Activator.CreateInstance( typeof( T ), bytes ) as T;
private void UpdateCurrentFile( Mod.Editor.FileRegistry path )
{

View file

@ -584,7 +584,7 @@ public partial class ModEditWindow : Window, IDisposable
() => _editor?.ShpkFiles ?? Array.Empty< Editor.FileRegistry >(),
DrawShaderPackagePanel,
() => _mod?.ModPath.FullName ?? string.Empty,
bytes => new ShpkTab( bytes ) );
null );
_center = new CombinedTexture( _left, _right );
}

View file

@ -322,7 +322,7 @@ public partial class ConfigWindow
IndividualCollections.AddResult.AlreadySet => AlreadyAssigned,
_ => string.Empty,
};
_newRetainerTooltip = Penumbra.CollectionManager.Individuals.CanAdd( IdentifierType.Retainer, _newCharacterName, _worldCombo.CurrentSelection.Key, ObjectKind.None,
_newRetainerTooltip = Penumbra.CollectionManager.Individuals.CanAdd( IdentifierType.Retainer, _newCharacterName, 0, ObjectKind.None,
Array.Empty< uint >(), out _newRetainerIdentifiers ) switch
{
_ when _newCharacterName.Length == 0 => NewRetainerTooltipEmpty,