Pathfinder rework (#11452)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Client.UserInterface.Controls;
|
||||
using Content.Shared.NPC;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
|
||||
@@ -12,21 +13,18 @@ public sealed partial class NPCWindow : FancyWindow
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
var sysManager = IoCManager.Resolve<IEntitySystemManager>();
|
||||
var debugSys = sysManager.GetEntitySystem<ClientAiDebugSystem>();
|
||||
var path = sysManager.GetEntitySystem<ClientPathfindingDebugSystem>();
|
||||
var path = sysManager.GetEntitySystem<PathfindingSystem>();
|
||||
|
||||
NPCPath.Pressed = (debugSys.Tooltips & AiDebugMode.Paths) != 0x0;
|
||||
NPCThonk.Pressed = (debugSys.Tooltips & AiDebugMode.Thonk) != 0x0;
|
||||
PathCrumbs.Pressed = (path.Modes & PathfindingDebugMode.Breadcrumbs) != 0x0;
|
||||
PathPolys.Pressed = (path.Modes & PathfindingDebugMode.Polys) != 0x0;
|
||||
PathNeighbors.Pressed = (path.Modes & PathfindingDebugMode.PolyNeighbors) != 0x0;
|
||||
PathRouteCosts.Pressed = (path.Modes & PathfindingDebugMode.RouteCosts) != 0x0;
|
||||
PathRoutes.Pressed = (path.Modes & PathfindingDebugMode.Routes) != 0x0;
|
||||
|
||||
NPCPath.OnToggled += args => debugSys.ToggleTooltip(AiDebugMode.Paths);
|
||||
NPCThonk.OnToggled += args => debugSys.ToggleTooltip(AiDebugMode.Thonk);
|
||||
|
||||
PathNodes.Pressed = (path.Modes & PathfindingDebugMode.Nodes) != 0x0;
|
||||
PathRegions.Pressed = (path.Modes & PathfindingDebugMode.Regions) != 0x0;
|
||||
PathRoutes.Pressed = (path.Modes & PathfindingDebugMode.Route) != 0x0;
|
||||
|
||||
PathNodes.OnToggled += args => path.ToggleTooltip(PathfindingDebugMode.Nodes);
|
||||
PathRegions.OnToggled += args => path.ToggleTooltip(PathfindingDebugMode.Regions);
|
||||
PathRoutes.OnToggled += args => path.ToggleTooltip(PathfindingDebugMode.Route);
|
||||
PathCrumbs.OnToggled += args => path.Modes ^= PathfindingDebugMode.Breadcrumbs;
|
||||
PathPolys.OnToggled += args => path.Modes ^= PathfindingDebugMode.Polys;
|
||||
PathNeighbors.OnToggled += args => path.Modes ^= PathfindingDebugMode.PolyNeighbors;
|
||||
PathRouteCosts.OnToggled += args => path.Modes ^= PathfindingDebugMode.RouteCosts;
|
||||
PathRoutes.OnToggled += args => path.Modes ^= PathfindingDebugMode.Routes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user