33 lines
1.4 KiB
C#
33 lines
1.4 KiB
C#
using Content.Client.UserInterface.Controls;
|
|
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>();
|
|
var debugSys = sysManager.GetEntitySystem<ClientAiDebugSystem>();
|
|
var path = sysManager.GetEntitySystem<ClientPathfindingDebugSystem>();
|
|
|
|
NPCPath.Pressed = (debugSys.Tooltips & AiDebugMode.Paths) != 0x0;
|
|
NPCThonk.Pressed = (debugSys.Tooltips & AiDebugMode.Thonk) != 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);
|
|
}
|
|
}
|