diff --git a/Content.Server/Revenant/EntitySystems/RevenantSystem.cs b/Content.Server/Revenant/EntitySystems/RevenantSystem.cs index 711cb50f2f1..e2a131dcdd6 100644 --- a/Content.Server/Revenant/EntitySystems/RevenantSystem.cs +++ b/Content.Server/Revenant/EntitySystems/RevenantSystem.cs @@ -22,6 +22,7 @@ using Content.Shared.StatusEffect; using Content.Shared.Store.Components; using Content.Shared.Stunnable; using Content.Shared.Tag; +using Content.Shared.Weapons.Melee.Events; // DeltaV using Robust.Server.GameObjects; using Robust.Shared.Physics.Components; using Robust.Shared.Prototypes; @@ -64,6 +65,7 @@ public sealed partial class RevenantSystem : EntitySystem SubscribeLocalEvent(OnStatusAdded); SubscribeLocalEvent(OnStatusEnded); SubscribeLocalEvent(_ => MakeVisible(true)); + SubscribeLocalEvent(OnMeleeAttack); // DeltaV SubscribeLocalEvent(OnRevenantGetVis); @@ -131,6 +133,14 @@ public sealed partial class RevenantSystem : EntitySystem ChangeEssenceAmount(uid, essenceDamage, component); } + /// + /// DeltaV - No more attack spam and remaining invisible + /// + private void OnMeleeAttack(Entity ent, ref MeleeAttackEvent args) + { + _statusEffects.TryAddStatusEffect(ent, "Corporeal", ent.Comp.MeleeRevealTime, false); + } + public bool ChangeEssenceAmount(EntityUid uid, FixedPoint2 amount, RevenantComponent? component = null, bool allowDeath = true, bool regenCap = false) { if (!Resolve(uid, ref component)) diff --git a/Content.Shared/Revenant/Components/RevenantComponent.cs b/Content.Shared/Revenant/Components/RevenantComponent.cs index 6d318640af0..2c6604610ca 100644 --- a/Content.Shared/Revenant/Components/RevenantComponent.cs +++ b/Content.Shared/Revenant/Components/RevenantComponent.cs @@ -300,4 +300,12 @@ public sealed partial class RevenantComponent : Component public string HarvestingState = "harvesting"; #endregion [DataField] public EntityUid? HauntAction; // Imp + + #region Melee + /// + /// DeltaV - The amount of time a rev is revealed after making a melee attack. + /// + [DataField] + public TimeSpan MeleeRevealTime = TimeSpan.FromSeconds(2); + #endregion }