6
2025-12-13 13:46:17 +03:00

31 lines
809 B
C#

using Robust.Shared.Map;
namespace Content.Server.NPC.Pathfinding;
/// <summary>
/// Connects 2 disparate locations.
/// </summary>
/// <remarks>
/// For example, 2 docking airlocks connecting 2 graphs, or an actual portal on the same graph.
/// </remarks>
public struct PathPortal
{
// Assume for now it's 2-way and code 1-ways later.
public readonly int Handle;
public readonly EntityCoordinates CoordinatesA;
public readonly EntityCoordinates CoordinatesB;
// TODO: Whenever the chunk rebuilds need to add a neighbor.
public PathPortal(int handle, EntityCoordinates coordsA, EntityCoordinates coordsB)
{
Handle = handle;
CoordinatesA = coordsA;
CoordinatesB = coordsB;
}
public override int GetHashCode()
{
return Handle;
}
}