mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Make Invalid ResolveData more definitive.
This commit is contained in:
parent
1ba38a7704
commit
4beded8a7a
1 changed files with 10 additions and 6 deletions
|
|
@ -5,23 +5,27 @@ namespace Penumbra.Collections;
|
|||
|
||||
public readonly struct ResolveData
|
||||
{
|
||||
public static readonly ResolveData Invalid = new(ModCollection.Empty);
|
||||
public static readonly ResolveData Invalid = new();
|
||||
|
||||
public readonly ModCollection ModCollection;
|
||||
public readonly IntPtr AssociatedGameObject;
|
||||
private readonly ModCollection? _modCollection;
|
||||
|
||||
public ModCollection ModCollection
|
||||
=> _modCollection ?? ModCollection.Empty;
|
||||
|
||||
public readonly IntPtr AssociatedGameObject;
|
||||
|
||||
public bool Valid
|
||||
=> ModCollection != ModCollection.Empty;
|
||||
=> _modCollection != null;
|
||||
|
||||
public ResolveData()
|
||||
{
|
||||
ModCollection = ModCollection.Empty;
|
||||
_modCollection = null!;
|
||||
AssociatedGameObject = IntPtr.Zero;
|
||||
}
|
||||
|
||||
public ResolveData( ModCollection collection, IntPtr gameObject )
|
||||
{
|
||||
ModCollection = collection;
|
||||
_modCollection = collection;
|
||||
AssociatedGameObject = gameObject;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue