MailingUnitBoundUserInterfaceState.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Content.Shared.Disposal.Components;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Disposal;
  4. [Serializable, NetSerializable]
  5. public sealed class MailingUnitBoundUserInterfaceState : BoundUserInterfaceState, IEquatable<MailingUnitBoundUserInterfaceState>
  6. {
  7. public string? Target;
  8. public List<string> TargetList;
  9. public string? Tag;
  10. public SharedDisposalUnitComponent.DisposalUnitBoundUserInterfaceState DisposalState;
  11. public MailingUnitBoundUserInterfaceState(SharedDisposalUnitComponent.DisposalUnitBoundUserInterfaceState disposalState, string? target, List<string> targetList, string? tag)
  12. {
  13. DisposalState = disposalState;
  14. Target = target;
  15. TargetList = targetList;
  16. Tag = tag;
  17. }
  18. public bool Equals(MailingUnitBoundUserInterfaceState? other)
  19. {
  20. if (other is null)
  21. return false;
  22. if (ReferenceEquals(this, other))
  23. return true;
  24. return DisposalState.Equals(other.DisposalState)
  25. && Target == other.Target
  26. && TargetList.Equals(other.TargetList)
  27. && Tag == other.Tag;
  28. }
  29. public override bool Equals(object? other)
  30. {
  31. if (other is MailingUnitBoundUserInterfaceState otherState)
  32. return Equals(otherState);
  33. return false;
  34. }
  35. public override int GetHashCode()
  36. {
  37. return base.GetHashCode();
  38. }
  39. }