Files
tbd-station-14/Content.Shared/Weapons/Ranged/Systems/UseDelayOnShootSystem.cs
2023-05-14 13:15:18 +10:00

21 lines
563 B
C#

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