mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
InventoryItem IEquatable
This commit is contained in:
parent
eae18553da
commit
075e5460a4
@ -5,7 +5,7 @@
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public struct InventoryItem
|
||||
public struct InventoryItem : IEquatable<InventoryItem>
|
||||
{
|
||||
internal InventoryItemId _id;
|
||||
internal InventoryDefId _def;
|
||||
@ -134,5 +134,8 @@ public struct Amount
|
||||
|
||||
public static bool operator ==( InventoryItem a, InventoryItem b ) => a._id == b._id;
|
||||
public static bool operator !=( InventoryItem a, InventoryItem b ) => a._id != b._id;
|
||||
public override bool Equals( object p ) => this.Equals( (InventoryItem)p );
|
||||
public override int GetHashCode() => _id.GetHashCode();
|
||||
public bool Equals( InventoryItem p ) => p._id == _id;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user