From 0e63c4a2c6dec8dfa260501fb7d73750261ea7b7 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sat, 25 Nov 2023 18:39:02 +0800 Subject: + init --- Assembly_Firstpass/Steamworks/DepotId_t.cs | 65 ++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Assembly_Firstpass/Steamworks/DepotId_t.cs (limited to 'Assembly_Firstpass/Steamworks/DepotId_t.cs') diff --git a/Assembly_Firstpass/Steamworks/DepotId_t.cs b/Assembly_Firstpass/Steamworks/DepotId_t.cs new file mode 100644 index 0000000..153afa5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DepotId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct DepotId_t : IEquatable, IComparable +{ + public static readonly DepotId_t Invalid = new DepotId_t(0u); + + public uint m_DepotId; + + public DepotId_t(uint value) + { + m_DepotId = value; + } + + public override string ToString() + { + return m_DepotId.ToString(); + } + + public override bool Equals(object other) + { + if (other is DepotId_t) + { + return this == (DepotId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_DepotId.GetHashCode(); + } + + public static bool operator ==(DepotId_t x, DepotId_t y) + { + return x.m_DepotId == y.m_DepotId; + } + + public static bool operator !=(DepotId_t x, DepotId_t y) + { + return !(x == y); + } + + public static explicit operator DepotId_t(uint value) + { + return new DepotId_t(value); + } + + public static explicit operator uint(DepotId_t that) + { + return that.m_DepotId; + } + + public bool Equals(DepotId_t other) + { + return m_DepotId == other.m_DepotId; + } + + public int CompareTo(DepotId_t other) + { + return m_DepotId.CompareTo(other.m_DepotId); + } +} -- cgit v1.1-26-g67d0