Update everything except for IPC and temp collections to new system.

This commit is contained in:
Ottermandias 2022-11-17 18:17:23 +01:00
parent 6a6eac1c3b
commit 4309ae8ce2
16 changed files with 400 additions and 249 deletions

View file

@ -37,7 +37,8 @@ public readonly struct ActorIdentifier : IEquatable<ActorIdentifier>
IdentifierType.Player => HomeWorld == other.HomeWorld && PlayerName.EqualsCi(other.PlayerName),
IdentifierType.Owned => HomeWorld == other.HomeWorld && PlayerName.EqualsCi(other.PlayerName) && Manager.DataIdEquals(this, other),
IdentifierType.Special => Special == other.Special,
IdentifierType.Npc => Manager.DataIdEquals(this, other) && (Index == other.Index || Index == ushort.MaxValue || other.Index == ushort.MaxValue),
IdentifierType.Npc => Manager.DataIdEquals(this, other)
&& (Index == other.Index || Index == ushort.MaxValue || other.Index == ushort.MaxValue),
_ => false,
};
}
@ -107,8 +108,9 @@ public readonly struct ActorIdentifier : IEquatable<ActorIdentifier>
ret.Add(nameof(Special), Special.ToString());
return ret;
case IdentifierType.Npc:
ret.Add(nameof(Kind), Kind.ToString());
ret.Add(nameof(Index), Index);
ret.Add(nameof(Kind), Kind.ToString());
if (Index != ushort.MaxValue)
ret.Add(nameof(Index), Index);
ret.Add(nameof(DataId), DataId);
return ret;
}