From b74bd10c32dc7e985fae0e7496b5637c1ef13cdc Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 4 Aug 2023 16:07:31 +1000 Subject: [PATCH] Fix turrets (#18606) --- .../Prototypes/Entities/Objects/Weapons/Guns/turrets.yml | 2 ++ Resources/Prototypes/NPCs/root.yml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml index 67cd5534aa..9fb02f7bed 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/turrets.yml @@ -109,6 +109,8 @@ rootTask: task: TurretCompound blackboard: + RotateSpeed: !type:Single + 3.141 SoundTargetInLOS: !type:SoundPathSpecifier path: /Audio/Effects/double_beep.ogg diff --git a/Resources/Prototypes/NPCs/root.yml b/Resources/Prototypes/NPCs/root.yml index 3d5de0915c..c6d2a8ee26 100644 --- a/Resources/Prototypes/NPCs/root.yml +++ b/Resources/Prototypes/NPCs/root.yml @@ -5,7 +5,10 @@ id: TurretCompound branches: - tasks: - # Shoot target if in range + - !type:HTNPrimitiveTask + operator: !type:UtilityOperator + proto: NearbyGunTargets + - !type:HTNPrimitiveTask preconditions: - !type:KeyExistsPrecondition