Files
crystall-punk-14/Content.Shared/Weapons/Ranged/Systems/UseDelayOnShootSystem.cs

21 lines
563 B
C#
Raw Normal View History

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);
}
}