Files
RobustToolbox/Robust.Client/Graphics/ClydeHandle.cs
T
Pieter-Jan Briers 0169312c0b Not actually functional FOV system.
There's enough various changes in here that this is worth committing already.
2020-02-05 00:10:58 +01:00

55 lines
1.2 KiB
C#

using System;
namespace Robust.Client.Graphics
{
internal struct ClydeHandle : IEquatable<ClydeHandle>
{
public ClydeHandle(long value)
{
Value = value;
}
public long Value { get; }
public static explicit operator ClydeHandle(long x)
{
return new ClydeHandle(x);
}
public static explicit operator long(ClydeHandle h)
{
return h.Value;
}
public bool Equals(ClydeHandle other)
{
return Value == other.Value;
}
public override bool Equals(object obj)
{
return obj is ClydeHandle other && Equals(other);
}
public override int GetHashCode()
{
return Value.GetHashCode();
}
public static bool operator ==(ClydeHandle left, ClydeHandle right)
{
return left.Equals(right);
}
public static bool operator !=(ClydeHandle left, ClydeHandle right)
{
return !left.Equals(right);
}
public override string ToString()
{
return $"ClydeHandle {Value}";
}
}
}