if (!_animations.HasRunningAnimation(uid, player, AnimKey))
{
- _animations.Play(uid, player, GetAnimation(comp.Speed), AnimKey);
+ _animations.Play((uid, player), GetAnimation(comp.Speed), AnimKey);
}
}
}
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Shared.Animations;
-using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Random;
/// </summary>
private void OnAnimationCompleted(EntityUid uid, PoweredLightVisualsComponent comp, AnimationCompletedEvent args)
{
+ if (!TryComp<AnimationPlayerComponent>(uid, out var animationPlayer))
+ return;
if (args.Key != PoweredLightVisualsComponent.BlinkingAnimationKey)
return;
-
if(!comp.IsBlinking)
return;
- AnimationSystem.Play(uid, Comp<AnimationPlayerComponent>(uid), BlinkingAnimation(comp), PoweredLightVisualsComponent.BlinkingAnimationKey);
+ AnimationSystem.Play((uid, animationPlayer), BlinkingAnimation(comp), PoweredLightVisualsComponent.BlinkingAnimationKey);
}
/// <summary>
var animationPlayer = EnsureComp<AnimationPlayerComponent>(uid);
if (shouldBeBlinking)
{
- AnimationSystem.Play(uid, animationPlayer, BlinkingAnimation(comp), PoweredLightVisualsComponent.BlinkingAnimationKey);
+ AnimationSystem.Play((uid, animationPlayer), BlinkingAnimation(comp), PoweredLightVisualsComponent.BlinkingAnimationKey);
}
else if (AnimationSystem.HasRunningAnimation(uid, animationPlayer, PoweredLightVisualsComponent.BlinkingAnimationKey))
{