mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
* Entity<T>, skipping Magazine and ChamberMagazine * missed some * AUGH!! * ballistic examine * dotnet hates me * WHY ARE YOU CALLED THAT!!!! * cheers aada
22 lines
628 B
C#
22 lines
628 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(Entity<UseDelayOnShootComponent> ent, ref GunShotEvent args)
|
|
{
|
|
if (TryComp(ent, out UseDelayComponent? useDelay))
|
|
_delay.TryResetDelay((ent, useDelay));
|
|
}
|
|
}
|