This commit is contained in:
Ottermandias 2024-03-01 14:35:41 +01:00
parent 1d74001281
commit af6100dfe4

View file

@ -1,15 +1,15 @@
namespace Penumbra.Collections;
public readonly struct ResolveData
public readonly struct ResolveData(ModCollection collection, nint gameObject)
{
public static readonly ResolveData Invalid = new();
private readonly ModCollection? _modCollection;
private readonly ModCollection? _modCollection = collection;
public ModCollection ModCollection
=> _modCollection ?? ModCollection.Empty;
public readonly nint AssociatedGameObject;
public readonly nint AssociatedGameObject = gameObject;
public bool Valid
=> _modCollection != null;
@ -18,12 +18,6 @@ public readonly struct ResolveData
: this(null!, nint.Zero)
{ }
public ResolveData(ModCollection collection, nint gameObject)
{
_modCollection = collection;
AssociatedGameObject = gameObject;
}
public ResolveData(ModCollection collection)
: this(collection, nint.Zero)
{ }