Files
tbd-station-14/Content.Client/NPC/NPCWindow.xaml.cs
wrexbe 56c2ad6a16 Move/Rename stuff (#11209)
-     Change namespace, and folder of FancyWindow to Content.Client.UserInterface.Controls
-     Change xaml reference from ui to controls in some places
-     Change ClientAlertsSystem from internal to public
-     Change namespace, and folder of HighDivider to Content.Client.UserInterface.Controls
2022-09-11 18:56:21 -07:00

34 lines
1.4 KiB
C#

using Content.Client.UserInterface.Controls;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Console;
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);
}
}