Add reveal to rev attack
This commit is contained in:
parent
7dc2c2ad70
commit
73712a7153
|
|
@ -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<RevenantComponent, StatusEffectAddedEvent>(OnStatusAdded);
|
||||
SubscribeLocalEvent<RevenantComponent, StatusEffectEndedEvent>(OnStatusEnded);
|
||||
SubscribeLocalEvent<RoundEndTextAppendEvent>(_ => MakeVisible(true));
|
||||
SubscribeLocalEvent<RevenantComponent, MeleeAttackEvent>(OnMeleeAttack); // DeltaV
|
||||
|
||||
SubscribeLocalEvent<RevenantComponent, GetVisMaskEvent>(OnRevenantGetVis);
|
||||
|
||||
|
|
@ -131,6 +133,14 @@ public sealed partial class RevenantSystem : EntitySystem
|
|||
ChangeEssenceAmount(uid, essenceDamage, component);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DeltaV - No more attack spam and remaining invisible
|
||||
/// </summary>
|
||||
private void OnMeleeAttack(Entity<RevenantComponent> ent, ref MeleeAttackEvent args)
|
||||
{
|
||||
_statusEffects.TryAddStatusEffect<CorporealComponent>(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))
|
||||
|
|
|
|||
|
|
@ -300,4 +300,12 @@ public sealed partial class RevenantComponent : Component
|
|||
public string HarvestingState = "harvesting";
|
||||
#endregion
|
||||
[DataField] public EntityUid? HauntAction; // Imp
|
||||
|
||||
#region Melee
|
||||
/// <summary>
|
||||
/// DeltaV - The amount of time a rev is revealed after making a melee attack.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public TimeSpan MeleeRevealTime = TimeSpan.FromSeconds(2);
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue