Pathfinder rework (#11452)
This commit is contained in:
@@ -1,8 +1,24 @@
|
||||
namespace Content.Server.NPC.Pathfinding;
|
||||
|
||||
[RegisterComponent]
|
||||
[Access(typeof(PathfindingSystem))]
|
||||
/// <summary>
|
||||
/// Stores the relevant pathfinding data for grids.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(PathfindingSystem))]
|
||||
public sealed class GridPathfindingComponent : Component
|
||||
{
|
||||
public readonly Dictionary<Vector2i, PathfindingChunk> Graph = new();
|
||||
public readonly HashSet<Vector2i> DirtyChunks = new();
|
||||
|
||||
/// <summary>
|
||||
/// Next time the graph is allowed to update.
|
||||
/// </summary>
|
||||
public TimeSpan NextUpdate;
|
||||
|
||||
public readonly Dictionary<Vector2i, GridPathfindingChunk> Chunks = new();
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the chunk where the specified portal is stored on this grid.
|
||||
/// </summary>
|
||||
public readonly Dictionary<PathPortal, Vector2i> PortalLookup = new();
|
||||
|
||||
public readonly List<PathPortal> DirtyPortals = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user