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.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user