mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 14:07:53 +03:00
* mass clean up
(cherry picked from commit 12bb873b02c1ef50e20763542b030452cc0613da)
* Revert "Centrifuge buff (#393)"
This reverts commit 2a59a18230.
(cherry picked from commit 9ee495ab4bb365e1ccd3dc627ecb55114fea6944)
* Shoving merge conflict
* fix rich traitor
* fix test
* yml
* fix test
* fix test
* ohh
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using Content.Shared._White.Move;
|
|
using Content.Shared.Buckle;
|
|
using Content.Shared.Gravity;
|
|
using Content.Shared.Movement.Components;
|
|
using Content.Shared.Standing;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Content.Shared._White.Animations;
|
|
|
|
public abstract class SharedWaddleAnimationSystem : EntitySystem
|
|
{
|
|
[Dependency] protected readonly IGameTiming Timing = default!;
|
|
[Dependency] private readonly StandingStateSystem _standingState = default!;
|
|
[Dependency] private readonly SharedGravitySystem _gravity = default!;
|
|
[Dependency] private readonly SharedBuckleSystem _buckle = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<WaddleAnimationComponent, MoveEventProxy>(OnMovementInput);
|
|
}
|
|
|
|
private void OnMovementInput(EntityUid uid, WaddleAnimationComponent component, MoveEventProxy args)
|
|
{
|
|
if (_standingState.IsDown(uid)
|
|
|| _gravity.IsWeightless(uid)
|
|
|| _buckle.IsBuckled(uid))
|
|
return;
|
|
|
|
PlayAnimation(uid);
|
|
}
|
|
|
|
protected abstract void PlayAnimation(EntityUid user);
|
|
}
|