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

@@ -42,10 +42,10 @@ namespace Content.Server.Tools
SubscribeLocalEvent<WelderComponent, ToolUseFinishAttemptEvent>(OnWelderToolUseFinishAttempt);
SubscribeLocalEvent<WelderComponent, ComponentShutdown>(OnWelderShutdown);
SubscribeLocalEvent<WelderComponent, ComponentGetState>(OnWelderGetState);
SubscribeLocalEvent<WelderComponent, ItemMeleeDamageEvent>(OnMeleeHit);
SubscribeLocalEvent<WelderComponent, MeleeHitEvent>(OnMeleeHit);
}
private void OnMeleeHit(EntityUid uid, WelderComponent component, ItemMeleeDamageEvent args)
private void OnMeleeHit(EntityUid uid, WelderComponent component, MeleeHitEvent args)
{
if (!args.Handled && component.Lit)
args.BonusDamage += component.LitMeleeDamageBonus;