28 lines
703 B
C#
28 lines
703 B
C#
using PkmnLib.Static.Libraries;
|
|
|
|
namespace PkmnLib.Static;
|
|
|
|
/// <summary>
|
|
/// A number that identifies a type. To be used with <see cref="TypeLibrary"/>
|
|
/// </summary>
|
|
public readonly record struct TypeIdentifier
|
|
{
|
|
/// <summary>
|
|
/// The underlying value of the type identifier.
|
|
/// </summary>
|
|
public byte Value { get; }
|
|
|
|
/// <inheritdoc cref="TypeIdentifier"/>
|
|
public TypeIdentifier(byte value)
|
|
{
|
|
Value = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Converts a byte to a type identifier.
|
|
/// </summary>
|
|
public static implicit operator TypeIdentifier(byte value) => new(value);
|
|
|
|
/// <inheritdoc />
|
|
public override int GetHashCode() => Value.GetHashCode();
|
|
} |