Events all over melee (#16997)

This commit is contained in:
Nemanja
2023-06-07 16:26:45 -04:00
committed by GitHub
parent 937aae14ff
commit 37d3056809
9 changed files with 170 additions and 34 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.Damage;
using Content.Shared.FixedPoint;
using Robust.Shared.Audio;
namespace Content.Shared.Weapons.Melee.Events;
@@ -70,6 +71,23 @@ public sealed class MeleeHitEvent : HandledEntityEventArgs
/// <summary>
/// Raised on a melee weapon to calculate potential damage bonuses or decreases.
/// </summary>
/// <param name="Damage"></param>
[ByRefEvent]
public record struct GetMeleeDamageEvent(DamageSpecifier Damage);
public record struct GetMeleeDamageEvent(EntityUid Weapon, DamageSpecifier Damage, List<DamageModifierSet> Modifiers, EntityUid User);
/// <summary>
/// Raised on a melee weapon to calculate the attack rate.
/// </summary>
[ByRefEvent]
public record struct GetMeleeAttackRateEvent(EntityUid Weapon, float Rate, float Multipliers, EntityUid User);
/// <summary>
/// Raised on a melee weapon to calculate the heavy damage modifier.
/// </summary>
[ByRefEvent]
public record struct GetHeavyDamageModifierEvent(EntityUid Weapon, FixedPoint2 DamageModifier, float Multipliers, EntityUid User);
/// <summary>
/// Raised on a melee weapon to calculate the heavy windup modifier.
/// </summary>
[ByRefEvent]
public record struct GetHeavyWindupModifierEvent(EntityUid Weapon, float WindupModifier, float Multipliers, EntityUid User);