Predicted stamina (#12413)
* Predicted stamina Needed to do some semblence of predicted melee. * Okay now done. * Pause support * Comment
This commit is contained in:
20
Content.Shared/CombatMode/DisarmedEvent.cs
Normal file
20
Content.Shared/CombatMode/DisarmedEvent.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace Content.Shared.CombatMode
|
||||
{
|
||||
public sealed class DisarmedEvent : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity being disarmed.
|
||||
/// </summary>
|
||||
public EntityUid Target { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The entity performing the disarm.
|
||||
/// </summary>
|
||||
public EntityUid Source { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Probability for push/knockdown.
|
||||
/// </summary>
|
||||
public float PushProbability { get; init; }
|
||||
}
|
||||
}
|
||||
10
Content.Shared/Damage/Components/ActiveStaminaComponent.cs
Normal file
10
Content.Shared/Damage/Components/ActiveStaminaComponent.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Content.Shared.Damage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks whether an entity has ANY stamina damage for update purposes only.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ActiveStaminaComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
48
Content.Shared/Damage/Components/StaminaComponent.cs
Normal file
48
Content.Shared/Damage/Components/StaminaComponent.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Shared.Damage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Add to an entity to paralyze it whenever it reaches critical amounts of Stamina DamageType.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class StaminaComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Have we reached peak stamina damage and been paralyzed?
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("critical")]
|
||||
public bool Critical;
|
||||
|
||||
/// <summary>
|
||||
/// How much stamina reduces per second.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("decay")]
|
||||
public float Decay = 3f;
|
||||
|
||||
/// <summary>
|
||||
/// How much time after receiving damage until stamina starts decreasing.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("cooldown")]
|
||||
public float DecayCooldown = 5f;
|
||||
|
||||
/// <summary>
|
||||
/// How much stamina damage this entity has taken.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("staminaDamage")]
|
||||
public float StaminaDamage;
|
||||
|
||||
/// <summary>
|
||||
/// How much stamina damage is required to entire stam crit.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("excess")]
|
||||
public float CritThreshold = 100f;
|
||||
|
||||
/// <summary>
|
||||
/// To avoid continuously updating our data we track the last time we updated so we can extrapolate our current stamina.
|
||||
/// </summary>
|
||||
[ViewVariables, DataField("lastUpdate", customTypeSerializer:typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan NextUpdate = TimeSpan.Zero;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Content.Shared.Damage.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Applies stamina damage when colliding with an entity.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class StaminaDamageOnCollideComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("damage")]
|
||||
public float Damage = 55f;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Content.Shared.Damage.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class StaminaDamageOnHitComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("damage")]
|
||||
public float Damage = 30f;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Shared.Damage.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Attempting to apply stamina damage on a melee hit to an entity.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public struct StaminaDamageOnHitAttemptEvent
|
||||
{
|
||||
public bool Cancelled;
|
||||
public SoundSpecifier? HitSoundOverride;
|
||||
|
||||
public StaminaDamageOnHitAttemptEvent(bool cancelled, SoundSpecifier? hitSoundOverride)
|
||||
{
|
||||
Cancelled = cancelled;
|
||||
HitSoundOverride = hitSoundOverride;
|
||||
}
|
||||
}
|
||||
31
Content.Shared/Damage/Events/StaminaMeleeHitEvent.cs
Normal file
31
Content.Shared/Damage/Events/StaminaMeleeHitEvent.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Content.Shared.Damage.Components;
|
||||
using Robust.Shared.Collections;
|
||||
|
||||
namespace Content.Shared.Damage.Events;
|
||||
|
||||
/// <summary>
|
||||
/// The components in the list are going to be hit,
|
||||
/// give opportunities to change the damage or other stuff.
|
||||
/// </summary>
|
||||
public sealed class StaminaMeleeHitEvent : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// List of hit stamina components.
|
||||
/// </summary>
|
||||
public List<StaminaComponent> HitList;
|
||||
|
||||
/// <summary>
|
||||
/// The multiplier. Generally, try to use *= or /= instead of overwriting.
|
||||
/// </summary>
|
||||
public float Multiplier = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The flat modifier. Generally, try to use += or -= instead of overwriting.
|
||||
/// </summary>
|
||||
public float FlatModifier = 0;
|
||||
|
||||
public StaminaMeleeHitEvent(List<StaminaComponent> hitList)
|
||||
{
|
||||
HitList = hitList;
|
||||
}
|
||||
}
|
||||
333
Content.Shared/Damage/Systems/StaminaSystem.cs
Normal file
333
Content.Shared/Damage/Systems/StaminaSystem.cs
Normal file
@@ -0,0 +1,333 @@
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.CombatMode;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared.Damage.Events;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Rounding;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Shared.Damage.Systems;
|
||||
|
||||
public sealed class StaminaSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
[Dependency] private readonly AlertsSystem _alerts = default!;
|
||||
[Dependency] private readonly MetaDataSystem _metadata = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly SharedStunSystem _stunSystem = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
|
||||
|
||||
private const string CollideFixture = "projectile";
|
||||
|
||||
/// <summary>
|
||||
/// How much of a buffer is there between the stun duration and when stuns can be re-applied.
|
||||
/// </summary>
|
||||
private static readonly TimeSpan StamCritBufferTime = TimeSpan.FromSeconds(3f);
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<StaminaComponent, ComponentStartup>(OnStartup);
|
||||
SubscribeLocalEvent<StaminaComponent, ComponentShutdown>(OnShutdown);
|
||||
SubscribeLocalEvent<StaminaComponent, ComponentGetState>(OnStamGetState);
|
||||
SubscribeLocalEvent<StaminaComponent, ComponentHandleState>(OnStamHandleState);
|
||||
SubscribeLocalEvent<StaminaComponent, DisarmedEvent>(OnDisarmed);
|
||||
SubscribeLocalEvent<StaminaDamageOnCollideComponent, StartCollideEvent>(OnCollide);
|
||||
SubscribeLocalEvent<StaminaDamageOnHitComponent, MeleeHitEvent>(OnHit);
|
||||
}
|
||||
|
||||
private void OnStamGetState(EntityUid uid, StaminaComponent component, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new StaminaComponentState()
|
||||
{
|
||||
Critical = component.Critical,
|
||||
Decay = component.Decay,
|
||||
CritThreshold = component.CritThreshold,
|
||||
DecayCooldown = component.DecayCooldown,
|
||||
LastUpdate = component.NextUpdate,
|
||||
StaminaDamage = component.StaminaDamage,
|
||||
};
|
||||
}
|
||||
|
||||
private void OnStamHandleState(EntityUid uid, StaminaComponent component, ref ComponentHandleState args)
|
||||
{
|
||||
if (args.Current is not StaminaComponentState state)
|
||||
return;
|
||||
|
||||
component.Critical = state.Critical;
|
||||
component.Decay = state.Decay;
|
||||
component.CritThreshold = state.CritThreshold;
|
||||
component.DecayCooldown = state.DecayCooldown;
|
||||
component.NextUpdate = state.LastUpdate;
|
||||
component.StaminaDamage = state.StaminaDamage;
|
||||
|
||||
if (component.Critical)
|
||||
EnterStamCrit(uid, component);
|
||||
else
|
||||
{
|
||||
if (component.StaminaDamage > 0f)
|
||||
EnsureComp<ActiveStaminaComponent>(uid);
|
||||
|
||||
ExitStamCrit(uid, component);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnShutdown(EntityUid uid, StaminaComponent component, ComponentShutdown args)
|
||||
{
|
||||
if (MetaData(uid).EntityLifeStage < EntityLifeStage.Terminating)
|
||||
{
|
||||
RemCompDeferred<ActiveStaminaComponent>(uid);
|
||||
}
|
||||
|
||||
SetStaminaAlert(uid);
|
||||
}
|
||||
|
||||
private void OnStartup(EntityUid uid, StaminaComponent component, ComponentStartup args)
|
||||
{
|
||||
SetStaminaAlert(uid, component);
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
public float GetStaminaDamage(EntityUid uid, StaminaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component))
|
||||
return 0f;
|
||||
|
||||
var curTime = _timing.CurTime;
|
||||
var pauseTime = _metadata.GetPauseTime(uid);
|
||||
return MathF.Max(0f, component.StaminaDamage - MathF.Max(0f, (float) (curTime - (component.NextUpdate + pauseTime)).TotalSeconds * component.Decay));
|
||||
}
|
||||
|
||||
private void OnDisarmed(EntityUid uid, StaminaComponent component, DisarmedEvent args)
|
||||
{
|
||||
if (args.Handled || !_random.Prob(args.PushProbability))
|
||||
return;
|
||||
|
||||
if (component.Critical)
|
||||
return;
|
||||
|
||||
var damage = args.PushProbability * component.CritThreshold;
|
||||
TakeStaminaDamage(uid, damage, component);
|
||||
|
||||
// We need a better method of getting if the entity is going to resist stam damage, both this and the lines in the foreach at the end of OnHit() are awful
|
||||
if (!component.Critical)
|
||||
return;
|
||||
|
||||
var targetEnt = Identity.Entity(args.Target, EntityManager);
|
||||
var sourceEnt = Identity.Entity(args.Source, EntityManager);
|
||||
|
||||
_popup.PopupEntity(Loc.GetString("stunned-component-disarm-success-others", ("source", sourceEnt), ("target", targetEnt)), targetEnt, Filter.PvsExcept(args.Source), PopupType.LargeCaution);
|
||||
_popup.PopupCursor(Loc.GetString("stunned-component-disarm-success", ("target", targetEnt)), Filter.Entities(args.Source), PopupType.Large);
|
||||
|
||||
_adminLogger.Add(LogType.DisarmedKnockdown, LogImpact.Medium, $"{ToPrettyString(args.Source):user} knocked down {ToPrettyString(args.Target):target}");
|
||||
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnHit(EntityUid uid, StaminaDamageOnHitComponent component, MeleeHitEvent args)
|
||||
{
|
||||
if (!args.IsHit)
|
||||
return;
|
||||
|
||||
if (component.Damage <= 0f) return;
|
||||
|
||||
var ev = new StaminaDamageOnHitAttemptEvent();
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
|
||||
if (ev.Cancelled) return;
|
||||
|
||||
args.HitSoundOverride = ev.HitSoundOverride;
|
||||
var stamQuery = GetEntityQuery<StaminaComponent>();
|
||||
var toHit = new List<StaminaComponent>();
|
||||
|
||||
// Split stamina damage between all eligible targets.
|
||||
foreach (var ent in args.HitEntities)
|
||||
{
|
||||
if (!stamQuery.TryGetComponent(ent, out var stam)) continue;
|
||||
toHit.Add(stam);
|
||||
}
|
||||
|
||||
var hitEvent = new StaminaMeleeHitEvent(toHit);
|
||||
RaiseLocalEvent(uid, hitEvent, false);
|
||||
|
||||
if (hitEvent.Handled)
|
||||
return;
|
||||
|
||||
var damage = component.Damage;
|
||||
|
||||
damage *= hitEvent.Multiplier;
|
||||
|
||||
damage += hitEvent.FlatModifier;
|
||||
|
||||
foreach (var comp in toHit)
|
||||
{
|
||||
var oldDamage = comp.StaminaDamage;
|
||||
TakeStaminaDamage(comp.Owner, damage / toHit.Count, comp);
|
||||
if (comp.StaminaDamage.Equals(oldDamage))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("stamina-resist"), comp.Owner, Filter.Entities(args.User));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCollide(EntityUid uid, StaminaDamageOnCollideComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
if (!args.OurFixture.ID.Equals(CollideFixture)) return;
|
||||
|
||||
TakeStaminaDamage(args.OtherFixture.Body.Owner, component.Damage);
|
||||
}
|
||||
|
||||
private void SetStaminaAlert(EntityUid uid, StaminaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component, false) || component.Deleted)
|
||||
{
|
||||
_alerts.ClearAlert(uid, AlertType.Stamina);
|
||||
return;
|
||||
}
|
||||
|
||||
var severity = ContentHelpers.RoundToLevels(MathF.Max(0f, component.CritThreshold - component.StaminaDamage), component.CritThreshold, 7);
|
||||
_alerts.ShowAlert(uid, AlertType.Stamina, (short) severity);
|
||||
}
|
||||
|
||||
public void TakeStaminaDamage(EntityUid uid, float value, StaminaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component, false) || component.Critical)
|
||||
return;
|
||||
|
||||
var oldDamage = component.StaminaDamage;
|
||||
component.StaminaDamage = MathF.Max(0f, component.StaminaDamage + value);
|
||||
|
||||
// Reset the decay cooldown upon taking damage.
|
||||
if (oldDamage < component.StaminaDamage)
|
||||
{
|
||||
var nextUpdate = _timing.CurTime + TimeSpan.FromSeconds(component.DecayCooldown);
|
||||
|
||||
if (component.NextUpdate < nextUpdate)
|
||||
component.NextUpdate = nextUpdate;
|
||||
}
|
||||
|
||||
var slowdownThreshold = component.CritThreshold / 2f;
|
||||
|
||||
// If we go above n% then apply slowdown
|
||||
if (oldDamage < slowdownThreshold &&
|
||||
component.StaminaDamage > slowdownThreshold)
|
||||
{
|
||||
_stunSystem.TrySlowdown(uid, TimeSpan.FromSeconds(3), true, 0.8f, 0.8f);
|
||||
}
|
||||
|
||||
SetStaminaAlert(uid, component);
|
||||
|
||||
if (!component.Critical)
|
||||
{
|
||||
if (component.StaminaDamage >= component.CritThreshold)
|
||||
{
|
||||
EnterStamCrit(uid, component);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (component.StaminaDamage < component.CritThreshold)
|
||||
{
|
||||
ExitStamCrit(uid, component);
|
||||
}
|
||||
}
|
||||
|
||||
EnsureComp<ActiveStaminaComponent>(uid);
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
if (!_timing.IsFirstTimePredicted) return;
|
||||
|
||||
var metaQuery = GetEntityQuery<MetaDataComponent>();
|
||||
var stamQuery = GetEntityQuery<StaminaComponent>();
|
||||
var curTime = _timing.CurTime;
|
||||
|
||||
foreach (var active in EntityQuery<ActiveStaminaComponent>())
|
||||
{
|
||||
// Just in case we have active but not stamina we'll check and account for it.
|
||||
if (!stamQuery.TryGetComponent(active.Owner, out var comp) ||
|
||||
comp.StaminaDamage <= 0f && !comp.Critical)
|
||||
{
|
||||
RemComp<ActiveStaminaComponent>(active.Owner);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Shouldn't need to consider paused time as we're only iterating non-paused stamina components.
|
||||
var nextUpdate = comp.NextUpdate;
|
||||
|
||||
if (nextUpdate > curTime)
|
||||
continue;
|
||||
|
||||
// We were in crit so come out of it and continue.
|
||||
if (comp.Critical)
|
||||
{
|
||||
ExitStamCrit(active.Owner, comp);
|
||||
continue;
|
||||
}
|
||||
|
||||
comp.NextUpdate += TimeSpan.FromSeconds(1f);
|
||||
TakeStaminaDamage(comp.Owner, -comp.Decay, comp);
|
||||
Dirty(comp);
|
||||
}
|
||||
}
|
||||
|
||||
private void EnterStamCrit(EntityUid uid, StaminaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component) ||
|
||||
component.Critical) return;
|
||||
|
||||
// To make the difference between a stun and a stamcrit clear
|
||||
// TODO: Mask?
|
||||
|
||||
component.Critical = true;
|
||||
component.StaminaDamage = component.CritThreshold;
|
||||
|
||||
var stunTime = TimeSpan.FromSeconds(6);
|
||||
_stunSystem.TryParalyze(uid, stunTime, true);
|
||||
|
||||
// Give them buffer before being able to be re-stunned
|
||||
component.NextUpdate = _timing.CurTime + stunTime + StamCritBufferTime;
|
||||
EnsureComp<ActiveStaminaComponent>(uid);
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
private void ExitStamCrit(EntityUid uid, StaminaComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component) ||
|
||||
!component.Critical) return;
|
||||
|
||||
component.Critical = false;
|
||||
component.StaminaDamage = 0f;
|
||||
component.NextUpdate = _timing.CurTime;
|
||||
SetStaminaAlert(uid, component);
|
||||
RemComp<ActiveStaminaComponent>(uid);
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
private sealed class StaminaComponentState : ComponentState
|
||||
{
|
||||
public bool Critical;
|
||||
public float Decay;
|
||||
public float DecayCooldown;
|
||||
public float StaminaDamage;
|
||||
public float CritThreshold;
|
||||
public TimeSpan LastUpdate;
|
||||
}
|
||||
}
|
||||
62
Content.Shared/Weapons/Melee/Events/MeleeHitEvent.cs
Normal file
62
Content.Shared/Weapons/Melee/Events/MeleeHitEvent.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using Content.Shared.Damage;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Shared.Weapons.Melee.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Raised directed on the melee weapon entity used to attack something in combat mode,
|
||||
/// whether through a click attack or wide attack.
|
||||
/// </summary>
|
||||
public sealed class MeleeHitEvent : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The base amount of damage dealt by the melee hit.
|
||||
/// </summary>
|
||||
public readonly DamageSpecifier BaseDamage = new();
|
||||
|
||||
/// <summary>
|
||||
/// Modifier sets to apply to the hit event when it's all said and done.
|
||||
/// This should be modified by adding a new entry to the list.
|
||||
/// </summary>
|
||||
public List<DamageModifierSet> ModifiersList = new();
|
||||
|
||||
/// <summary>
|
||||
/// Damage to add to the default melee weapon damage. Applied before modifiers.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This might be required as damage modifier sets cannot add a new damage type to a DamageSpecifier.
|
||||
/// </remarks>
|
||||
public DamageSpecifier BonusDamage = new();
|
||||
|
||||
/// <summary>
|
||||
/// A list containing every hit entity. Can be zero.
|
||||
/// </summary>
|
||||
public IEnumerable<EntityUid> HitEntities { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Used to define a new hit sound in case you want to override the default GenericHit.
|
||||
/// Also gets a pitch modifier added to it.
|
||||
/// </summary>
|
||||
public SoundSpecifier? HitSoundOverride {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// The user who attacked with the melee weapon.
|
||||
/// </summary>
|
||||
public EntityUid User { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Check if this is true before attempting to do something during a melee attack other than changing/adding bonus damage. <br/>
|
||||
/// For example, do not spend charges unless <see cref="IsHit"/> equals true.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Examining melee weapons calls this event, but with <see cref="IsHit"/> set to false.
|
||||
/// </remarks>
|
||||
public bool IsHit = true;
|
||||
|
||||
public MeleeHitEvent(List<EntityUid> hitEntities, EntityUid user, DamageSpecifier baseDamage)
|
||||
{
|
||||
HitEntities = hitEntities;
|
||||
User = user;
|
||||
BaseDamage = baseDamage;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.CombatMode;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
Reference in New Issue
Block a user