using Content.Shared.Damage;
using Robust.Shared.Audio;
namespace Content.Shared.Weapons.Melee.Events;
///
/// Raised directed on the melee weapon entity used to attack something in combat mode,
/// whether through a click attack or wide attack.
///
public sealed class MeleeHitEvent : HandledEntityEventArgs
{
///
/// The base amount of damage dealt by the melee hit.
///
public readonly DamageSpecifier BaseDamage = new();
///
/// 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.
///
public List ModifiersList = new();
///
/// Damage to add to the default melee weapon damage. Applied before modifiers.
///
///
/// This might be required as damage modifier sets cannot add a new damage type to a DamageSpecifier.
///
public DamageSpecifier BonusDamage = new();
///
/// A list containing every hit entity. Can be zero.
///
public IEnumerable HitEntities { get; }
///
/// Used to define a new hit sound in case you want to override the default GenericHit.
/// Also gets a pitch modifier added to it.
///
public SoundSpecifier? HitSoundOverride {get; set;}
///
/// The user who attacked with the melee weapon.
///
public EntityUid User { get; }
///
/// Check if this is true before attempting to do something during a melee attack other than changing/adding bonus damage.
/// For example, do not spend charges unless equals true.
///
///
/// Examining melee weapons calls this event, but with set to false.
///
public bool IsHit = true;
public MeleeHitEvent(List hitEntities, EntityUid user, DamageSpecifier baseDamage)
{
HitEntities = hitEntities;
User = user;
BaseDamage = baseDamage;
}
}