Fix incorrect source weapon in stamina damage logs (#15778)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Chief-Engineer
2023-04-27 13:56:51 -05:00
committed by GitHub
parent 4b371ae271
commit 8704707dbd
4 changed files with 13 additions and 7 deletions

View File

@@ -44,6 +44,11 @@ public sealed class MeleeHitEvent : HandledEntityEventArgs
/// </summary>
public readonly EntityUid User;
/// <summary>
/// The melee weapon used.
/// </summary>
public readonly EntityUid Weapon;
/// <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.
@@ -53,10 +58,11 @@ public sealed class MeleeHitEvent : HandledEntityEventArgs
/// </remarks>
public bool IsHit = true;
public MeleeHitEvent(List<EntityUid> hitEntities, EntityUid user, DamageSpecifier baseDamage)
public MeleeHitEvent(List<EntityUid> hitEntities, EntityUid user, EntityUid weapon, DamageSpecifier baseDamage)
{
HitEntities = hitEntities;
User = user;
Weapon = weapon;
BaseDamage = baseDamage;
}
}