From abfa9ff856922bc6d3025274a9b6507c84047bf7 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sat, 6 Jan 2024 15:32:50 -0500 Subject: [PATCH] Fixes NPCs that lack a UseDelay component failing to interact with objects (#23638) fixes NPCs failing to interact with objects --- .../Operators/Interactions/InteractWithOperator.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Interactions/InteractWithOperator.cs b/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Interactions/InteractWithOperator.cs index a8abb5ac4c..8e3ab5238a 100644 --- a/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Interactions/InteractWithOperator.cs +++ b/Content.Server/NPC/HTN/PrimitiveTasks/Operators/Interactions/InteractWithOperator.cs @@ -18,8 +18,7 @@ public sealed partial class InteractWithOperator : HTNOperator { var owner = blackboard.GetValue(NPCBlackboard.Owner); - if (!_entManager.TryGetComponent(owner, out var useDelay) || - _entManager.System().IsDelayed((owner, useDelay)) || + if (_entManager.TryGetComponent(owner, out var useDelay) && _entManager.System().IsDelayed((owner, useDelay)) || !blackboard.TryGetValue(TargetKey, out var moveTarget, _entManager) || !_entManager.TryGetComponent(moveTarget, out var targetXform)) { -- 2.51.2