using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Preferences.Loadouts;
///
/// Specifies the selected prototype and custom data for a loadout.
///
[Serializable, NetSerializable, DataDefinition]
public sealed partial class Loadout : IEquatable
{
[DataField]
public ProtoId Prototype;
public bool Equals(Loadout? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Prototype.Equals(other.Prototype);
}
public override bool Equals(object? obj)
{
return ReferenceEquals(this, obj) || obj is Loadout other && Equals(other);
}
public override int GetHashCode()
{
return Prototype.GetHashCode();
}
}