CatStation/Content.Shared/Weapons/Ranged/Systems/UseDelayOnShootSystem.cs
Sir Warock ec63a41842
Cleanup of UseDelay (#45350)
* Moving into Systems & Components Folders

* splitting into API file

* Make Method accept null values

* small fix
2026-09-05 17:10:50 +00:00

20 lines
566 B
C#

using Content.Shared.Timing.Systems;
using Content.Shared.Weapons.Ranged.Components;
namespace Content.Shared.Weapons.Ranged.Systems;
public sealed partial class UseDelayOnShootSystem : EntitySystem
{
[Dependency] private UseDelaySystem _delay = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<UseDelayOnShootComponent, GunShotEvent>(OnUseShoot);
}
private void OnUseShoot(Entity<UseDelayOnShootComponent> ent, ref GunShotEvent args)
{
_delay.TryResetDelay(ent.Owner);
}
}