using PkmnLib.Static.Libraries;
using PkmnLib.Static.Utils;
namespace PkmnLib.Static;
///
/// A number that identifies a type. To be used with
///
public readonly struct TypeIdentifier : IEquatable
{
///
/// The name of the type identifier.
///
public StringKey Name { get; }
///
/// The underlying value of the type identifier.
///
public byte Value { get; }
///
public TypeIdentifier(byte value, StringKey name)
{
Value = value;
Name = name;
}
///
public override int GetHashCode() => Value.GetHashCode();
///
public bool Equals(TypeIdentifier other) => Value == other.Value;
///
public override bool Equals(object? obj) => obj is TypeIdentifier other && Equals(other);
public static bool operator ==(TypeIdentifier left, TypeIdentifier right) => left.Equals(right);
public static bool operator !=(TypeIdentifier left, TypeIdentifier right) => !left.Equals(right);
}