combined MeleeHitEvent and ItemMeleeDamageEvent (#11628)

Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
This commit is contained in:
rolfero
2022-11-03 13:01:08 +01:00
committed by GitHub
parent 6c834c5371
commit e3579c99f5
10 changed files with 32 additions and 53 deletions

View File

@@ -37,7 +37,7 @@ namespace Content.Server.Wieldable
SubscribeLocalEvent<WieldableComponent, GetVerbsEvent<InteractionVerb>>(AddToggleWieldVerb);
SubscribeLocalEvent<WieldableComponent, DisarmAttemptEvent>(OnDisarmAttemptEvent);
SubscribeLocalEvent<IncreaseDamageOnWieldComponent, ItemMeleeDamageEvent>(OnMeleeHit);
SubscribeLocalEvent<IncreaseDamageOnWieldComponent, MeleeHitEvent>(OnMeleeHit);
}
private void OnDisarmAttemptEvent(EntityUid uid, WieldableComponent component, DisarmAttemptEvent args)
@@ -233,7 +233,7 @@ namespace Content.Server.Wieldable
AttemptUnwield(args.BlockingEntity, component, args.User);
}
private void OnMeleeHit(EntityUid uid, IncreaseDamageOnWieldComponent component, ItemMeleeDamageEvent args)
private void OnMeleeHit(EntityUid uid, IncreaseDamageOnWieldComponent component, MeleeHitEvent args)
{
if (EntityManager.TryGetComponent<WieldableComponent>(uid, out var wield))
{