combined MeleeHitEvent and ItemMeleeDamageEvent (#11628)
Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user