Remove deprecated NPC debug buttons (#15824)

This commit is contained in:
metalgearsloth
2023-04-29 16:47:10 +10:00
committed by GitHub
parent 2b34ce33de
commit ab9b5ac0b2
3 changed files with 52 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
using Content.Client.NPC.HTN;
using Content.Client.UserInterface.Controls;
using Content.Shared.NPC;
using Robust.Client.AutoGenerated;
@@ -13,14 +14,17 @@ public sealed partial class NPCWindow : FancyWindow
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
var sysManager = IoCManager.Resolve<IEntitySystemManager>();
var htn = sysManager.GetEntitySystem<HTNSystem>();
var path = sysManager.GetEntitySystem<PathfindingSystem>();
NPCThonk.Pressed = htn.EnableOverlay;
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;
NPCThonk.OnToggled += args => htn.EnableOverlay = args.Pressed;
PathCrumbs.OnToggled += args => path.Modes ^= PathfindingDebugMode.Breadcrumbs;
PathPolys.OnToggled += args => path.Modes ^= PathfindingDebugMode.Polys;
PathNeighbors.OnToggled += args => path.Modes ^= PathfindingDebugMode.PolyNeighbors;