Skip to content

Commit

Permalink
Changes Attempt melee event to MeleeHitEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
keronshb committed Feb 12, 2025
1 parent 0383535 commit 7e167e5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Content.Shared/RepulseAttract/RepulseAttractSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using System.Numerics;
using Content.Shared.Weapons.Melee;

namespace Content.Shared.RepulseAttract;

Expand All @@ -22,13 +23,10 @@ public sealed class RepulseAttractSystem : EntitySystem
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RepulseAttractComponent, AttemptMeleeEvent>(OnMeleeAttempt, after: [typeof(SharedWieldableSystem)]);
SubscribeLocalEvent<RepulseAttractComponent, MeleeHitEvent>(OnMeleeAttempt, before: [typeof(UseDelayOnMeleeHitSystem)], after: [typeof(SharedWieldableSystem)]);
}
private void OnMeleeAttempt(Entity<RepulseAttractComponent> ent, ref AttemptMeleeEvent args)
private void OnMeleeAttempt(Entity<RepulseAttractComponent> ent, ref MeleeHitEvent args)
{
if (args.Cancelled)
return;

if (_delay.IsDelayed(ent.Owner))
return;

Expand Down

0 comments on commit 7e167e5

Please sign in to comment.