Files
OldThink/Content.Server/_White/Other/FastAndFuriousSystem/FastAndFuriousSystem.cs
Aviu00 9f00a90f24 Aspects (#266)
* - add: Revive fast and furious aspect.

* - add: Update accents.

* - add: More buzzing for moth.

* - tweak: Change desc.

* - fix: Fixes.

* - add: RandomItemAspect.

* - fix: Fix arachnid socks.

* - tweak: Update desc part 2.
2024-04-02 17:19:33 +03:00

27 lines
892 B
C#

using Content.Shared.Movement.Systems;
namespace Content.Server._White.Other.FastAndFuriousSystem;
public sealed class FastAndFuriousSystem : EntitySystem
{
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<FastAndFuriousComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<FastAndFuriousComponent, RefreshMovementSpeedModifiersEvent>(OnRefresh);
}
private void OnRefresh(Entity<FastAndFuriousComponent> ent, ref RefreshMovementSpeedModifiersEvent args)
{
args.ModifySpeed(ent.Comp.WalkModifier, ent.Comp.SprintModifier);
}
private void OnMapInit(Entity<FastAndFuriousComponent> ent, ref MapInitEvent args)
{
_movementSpeedModifierSystem.RefreshMovementSpeedModifiers(ent);
}
}