1
0

PathPortal.cs 809 B

123456789101112131415161718192021222324252627282930
  1. using Robust.Shared.Map;
  2. namespace Content.Server.NPC.Pathfinding;
  3. /// <summary>
  4. /// Connects 2 disparate locations.
  5. /// </summary>
  6. /// <remarks>
  7. /// For example, 2 docking airlocks connecting 2 graphs, or an actual portal on the same graph.
  8. /// </remarks>
  9. public struct PathPortal
  10. {
  11. // Assume for now it's 2-way and code 1-ways later.
  12. public readonly int Handle;
  13. public readonly EntityCoordinates CoordinatesA;
  14. public readonly EntityCoordinates CoordinatesB;
  15. // TODO: Whenever the chunk rebuilds need to add a neighbor.
  16. public PathPortal(int handle, EntityCoordinates coordsA, EntityCoordinates coordsB)
  17. {
  18. Handle = handle;
  19. CoordinatesA = coordsA;
  20. CoordinatesB = coordsB;
  21. }
  22. public override int GetHashCode()
  23. {
  24. return Handle;
  25. }
  26. }