Pathfinder rework (#11452)
This commit is contained in:
13
Content.Shared/NPC/Events/HTNMessage.cs
Normal file
13
Content.Shared/NPC/Events/HTNMessage.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.NPC;
|
||||
|
||||
/// <summary>
|
||||
/// Has debug information for HTN NPCs.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class HTNMessage : EntityEventArgs
|
||||
{
|
||||
public EntityUid Uid;
|
||||
public string Text = string.Empty;
|
||||
}
|
||||
23
Content.Shared/NPC/Events/PathBreadcrumbsMessage.cs
Normal file
23
Content.Shared/NPC/Events/PathBreadcrumbsMessage.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.NPC;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PathBreadcrumbsMessage : EntityEventArgs
|
||||
{
|
||||
public Dictionary<EntityUid, Dictionary<Vector2i, List<PathfindingBreadcrumb>>> Breadcrumbs = new();
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PathBreadcrumbsRefreshMessage : EntityEventArgs
|
||||
{
|
||||
public EntityUid GridUid;
|
||||
public Vector2i Origin;
|
||||
public List<PathfindingBreadcrumb> Data = new();
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PathPolysMessage : EntityEventArgs
|
||||
{
|
||||
public Dictionary<EntityUid, Dictionary<Vector2i, Dictionary<Vector2i, List<DebugPathPoly>>>> Polys = new();
|
||||
}
|
||||
15
Content.Shared/NPC/Events/PathPolysRefreshMessage.cs
Normal file
15
Content.Shared/NPC/Events/PathPolysRefreshMessage.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.NPC;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PathPolysRefreshMessage : EntityEventArgs
|
||||
{
|
||||
public EntityUid GridUid;
|
||||
public Vector2i Origin;
|
||||
|
||||
/// <summary>
|
||||
/// Multi-dimension arrays aren't supported so
|
||||
/// </summary>
|
||||
public Dictionary<Vector2i, List<DebugPathPoly>> Polys = new();
|
||||
}
|
||||
19
Content.Shared/NPC/Events/PathRouteMessage.cs
Normal file
19
Content.Shared/NPC/Events/PathRouteMessage.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.NPC;
|
||||
|
||||
/// <summary>
|
||||
/// Debug message containing a pathfinding route.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PathRouteMessage : EntityEventArgs
|
||||
{
|
||||
public List<DebugPathPoly> Path;
|
||||
public Dictionary<DebugPathPoly, float> Costs;
|
||||
|
||||
public PathRouteMessage(List<DebugPathPoly> path, Dictionary<DebugPathPoly, float> costs)
|
||||
{
|
||||
Path = path;
|
||||
Costs = costs;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.NPC;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class RequestPathfindingDebugMessage : EntityEventArgs
|
||||
{
|
||||
public PathfindingDebugMode Mode;
|
||||
}
|
||||
Reference in New Issue
Block a user