From 6cd799fbebf634fc4ac6e80e5c033292c423caa8 Mon Sep 17 00:00:00 2001 From: TGRCDev Date: Sun, 22 Sep 2024 14:22:14 -0700 Subject: [PATCH] Animated guns no longer bolt themselves by default --- .../Revenant/EntitySystems/RevenantAnimatedSystem.cs | 4 ++-- Content.Shared/Revenant/Components/RevenantComponent.cs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Content.Server/Revenant/EntitySystems/RevenantAnimatedSystem.cs b/Content.Server/Revenant/EntitySystems/RevenantAnimatedSystem.cs index c68be537fadd3f..a4c50677024b46 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantAnimatedSystem.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantAnimatedSystem.cs @@ -107,7 +107,7 @@ private void OnComponentStartup(Entity ent, ref Compo if (HasComp(ent)) { // Goals: Magdump into any nearby creatures, and melee hit them if empty - if (TryComp(ent, out var bolt)) + if (ent.Comp.Revenant != null && ent.Comp.Revenant.Value.Comp.AnimateCanBoltGuns && TryComp(ent, out var bolt)) _gunSystem.SetBoltClosed(ent, bolt, true); htn.RootTask = new HTNCompoundTask() { Task = "SimpleRangedHostileCompound" }; } @@ -201,4 +201,4 @@ public void InanimateTarget(EntityUid target, RevenantAnimatedComponent? comp = RemComp(target); } -} \ No newline at end of file +} diff --git a/Content.Shared/Revenant/Components/RevenantComponent.cs b/Content.Shared/Revenant/Components/RevenantComponent.cs index 792c44d9b99241..ef98fefe32b4a9 100644 --- a/Content.Shared/Revenant/Components/RevenantComponent.cs +++ b/Content.Shared/Revenant/Components/RevenantComponent.cs @@ -37,7 +37,7 @@ public sealed partial class RevenantComponent : Component /// /// If true, only bible users can exorcise this revenant /// with a bible. - /// + /// /// If false, anyone who tries to exorcise a revenant with /// a bible will be able to. /// @@ -277,6 +277,9 @@ public sealed partial class RevenantComponent : Component [ViewVariables(VVAccess.ReadWrite), DataField] public float AnimateSprintSpeed = DefaultAnimateSprintSpeed; + + [DataField, ViewVariables(VVAccess.ReadWrite)] + public bool AnimateCanBoltGuns = false; #endregion [DataField]