2023-04-29 16:47:10 +10:00
|
|
|
using Content.Client.NPC.HTN;
|
2022-09-11 18:56:21 -07:00
|
|
|
using Content.Client.UserInterface.Controls;
|
2022-09-30 14:39:48 +10:00
|
|
|
using Content.Shared.NPC;
|
2022-09-06 00:28:23 +10:00
|
|
|
using Robust.Client.AutoGenerated;
|
|
|
|
|
using Robust.Client.UserInterface.XAML;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.NPC;
|
|
|
|
|
|
|
|
|
|
[GenerateTypedNameReferences]
|
|
|
|
|
public sealed partial class NPCWindow : FancyWindow
|
|
|
|
|
{
|
|
|
|
|
public NPCWindow()
|
|
|
|
|
{
|
|
|
|
|
RobustXamlLoader.Load(this);
|
|
|
|
|
IoCManager.InjectDependencies(this);
|
|
|
|
|
var sysManager = IoCManager.Resolve<IEntitySystemManager>();
|
2023-04-29 16:47:10 +10:00
|
|
|
var htn = sysManager.GetEntitySystem<HTNSystem>();
|
2022-09-30 14:39:48 +10:00
|
|
|
var path = sysManager.GetEntitySystem<PathfindingSystem>();
|
2022-09-06 00:28:23 +10:00
|
|
|
|
2023-04-29 16:47:10 +10:00
|
|
|
NPCThonk.Pressed = htn.EnableOverlay;
|
2022-09-30 14:39:48 +10:00
|
|
|
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;
|
2022-09-06 00:28:23 +10:00
|
|
|
|
2023-04-29 16:47:10 +10:00
|
|
|
NPCThonk.OnToggled += args => htn.EnableOverlay = args.Pressed;
|
2022-09-30 14:39:48 +10:00
|
|
|
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;
|
2022-09-06 00:28:23 +10:00
|
|
|
}
|
|
|
|
|
}
|