| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using Content.Shared.FixedPoint;
- using Robust.Shared.Serialization;
- namespace Content.Shared.Chemistry.Reagent;
- [ImplicitDataDefinitionForInheritors, Serializable, NetSerializable]
- public abstract partial class ReagentData : IEquatable<ReagentData>
- {
- /// <summary>
- /// Convert to a string representation. This if for logging & debugging. This is not localized and should not be
- /// shown to players.
- /// </summary>
- public virtual string ToString(string prototype, FixedPoint2 quantity)
- {
- return $"{prototype}:{GetType().Name}:{quantity}";
- }
- /// <summary>
- /// Convert to a string representation. This if for logging & debugging. This is not localized and should not be
- /// shown to players.
- /// </summary>
- public virtual string ToString(string prototype)
- {
- return $"{prototype}:{GetType().Name}";
- }
- public abstract bool Equals(ReagentData? other);
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj))
- return false;
- if (ReferenceEquals(this, obj))
- return true;
- if (obj.GetType() != GetType())
- return false;
- return Equals((ReagentData) obj);
- }
- public abstract override int GetHashCode();
- public abstract ReagentData Clone();
- }
|