| 12345678910111213141516171819202122232425262728293031 |
- using Robust.Shared.Prototypes;
- using Robust.Shared.Serialization;
- namespace Content.Shared.Preferences.Loadouts;
- /// <summary>
- /// Specifies the selected prototype and custom data for a loadout.
- /// </summary>
- [Serializable, NetSerializable, DataDefinition]
- public sealed partial class Loadout : IEquatable<Loadout>
- {
- [DataField]
- public ProtoId<LoadoutPrototype> 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();
- }
- }
|