Add pathfinding support for NPCs climbing tables (#17415)

This commit is contained in:
Vordenburg
2023-07-28 02:37:29 -04:00
committed by GitHub
parent 494b9e5b93
commit 49f3f07e30
11 changed files with 114 additions and 15 deletions

View File

@@ -7,6 +7,7 @@ using Content.Server.Administration.Managers;
using Content.Server.Destructible;
using Content.Server.NPC.Components;
using Content.Shared.Administration;
using Content.Shared.Climbing;
using Content.Shared.Interaction;
using Content.Shared.NPC;
using Robust.Server.Player;
@@ -436,6 +437,11 @@ namespace Content.Server.NPC.Pathfinding
flags |= PathFlags.Smashing;
}
if (blackboard.TryGetValue<bool>(NPCBlackboard.NavClimb, out var climb, EntityManager) && climb)
{
flags |= PathFlags.Climbing;
}
if (blackboard.TryGetValue<bool>(NPCBlackboard.NavInteract, out var interact, EntityManager) && interact)
{
flags |= PathFlags.Interact;