Skip to content

Commit

Permalink
Animated guns no longer bolt themselves by default
Browse files Browse the repository at this point in the history
  • Loading branch information
TGRCdev committed Sep 22, 2024
1 parent 699bc76 commit 6cd799f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void OnComponentStartup(Entity<RevenantAnimatedComponent> ent, ref Compo
if (HasComp<GunComponent>(ent))
{
// Goals: Magdump into any nearby creatures, and melee hit them if empty
if (TryComp<ChamberMagazineAmmoProviderComponent>(ent, out var bolt))
if (ent.Comp.Revenant != null && ent.Comp.Revenant.Value.Comp.AnimateCanBoltGuns && TryComp<ChamberMagazineAmmoProviderComponent>(ent, out var bolt))
_gunSystem.SetBoltClosed(ent, bolt, true);
htn.RootTask = new HTNCompoundTask() { Task = "SimpleRangedHostileCompound" };
}
Expand Down Expand Up @@ -201,4 +201,4 @@ public void InanimateTarget(EntityUid target, RevenantAnimatedComponent? comp =

RemComp<RevenantAnimatedComponent>(target);
}
}
}
5 changes: 4 additions & 1 deletion Content.Shared/Revenant/Components/RevenantComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public sealed partial class RevenantComponent : Component
/// <summary>
/// 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.
/// </summary>
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 6cd799f

Please sign in to comment.