Fixes lathe stuff (#3383)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Power;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.Animations;
|
||||
@@ -18,6 +18,7 @@ namespace Content.Client.GameObjects.Components.Power
|
||||
private Animation _insertingGlassAnimation;
|
||||
private Animation _insertingGoldAnimation;
|
||||
private Animation _insertingPlasmaAnimation;
|
||||
private Animation _insertingPlasticAnimation;
|
||||
|
||||
public override void LoadData(YamlMappingNode node)
|
||||
{
|
||||
@@ -28,6 +29,7 @@ namespace Content.Client.GameObjects.Components.Power
|
||||
_insertingGlassAnimation = PopulateAnimation("protolathe_glass", 0.9f);
|
||||
_insertingGoldAnimation = PopulateAnimation("protolathe_gold", 0.9f);
|
||||
_insertingPlasmaAnimation = PopulateAnimation("protolathe_plasma", 0.9f);
|
||||
_insertingPlasticAnimation = PopulateAnimation("protolathe_plastic", 0.9f);
|
||||
}
|
||||
|
||||
private Animation PopulateAnimation(string sprite, float length)
|
||||
@@ -103,6 +105,12 @@ namespace Content.Client.GameObjects.Components.Power
|
||||
animPlayer.Play(_insertingPlasmaAnimation, AnimationKey);
|
||||
}
|
||||
break;
|
||||
case LatheVisualState.InsertingPlastic:
|
||||
if (!animPlayer.HasRunningAnimation(AnimationKey))
|
||||
{
|
||||
animPlayer.Play(_insertingPlasticAnimation, AnimationKey);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user