1
0

DisposalHolderComponent.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using Content.Server.Atmos;
  2. using Content.Server.Disposal.Tube.Components;
  3. using Content.Shared.Atmos;
  4. using Robust.Shared.Containers;
  5. namespace Content.Server.Disposal.Unit.Components
  6. {
  7. [RegisterComponent]
  8. public sealed partial class DisposalHolderComponent : Component, IGasMixtureHolder
  9. {
  10. public Container Container = null!;
  11. /// <summary>
  12. /// The total amount of time that it will take for this entity to
  13. /// be pushed to the next tube
  14. /// </summary>
  15. [ViewVariables]
  16. public float StartingTime { get; set; }
  17. /// <summary>
  18. /// Time left until the entity is pushed to the next tube
  19. /// </summary>
  20. [ViewVariables]
  21. public float TimeLeft { get; set; }
  22. [ViewVariables]
  23. public EntityUid? PreviousTube { get; set; }
  24. [ViewVariables]
  25. public Direction PreviousDirection { get; set; } = Direction.Invalid;
  26. [ViewVariables]
  27. public Direction PreviousDirectionFrom => (PreviousDirection == Direction.Invalid) ? Direction.Invalid : PreviousDirection.GetOpposite();
  28. [ViewVariables]
  29. public EntityUid? CurrentTube { get; set; }
  30. // CurrentDirection is not null when CurrentTube isn't null.
  31. [ViewVariables]
  32. public Direction CurrentDirection { get; set; } = Direction.Invalid;
  33. /// <summary>Mistake prevention</summary>
  34. [ViewVariables]
  35. public bool IsExitingDisposals { get; set; } = false;
  36. /// <summary>
  37. /// A list of tags attached to the content, used for sorting
  38. /// </summary>
  39. [ViewVariables]
  40. public HashSet<string> Tags { get; set; } = new();
  41. [DataField("air")]
  42. public GasMixture Air { get; set; } = new(70);
  43. }
  44. }