Toolboxes Update (#985)

This commit is contained in:
Swept
2020-05-24 16:56:19 +00:00
committed by GitHub
parent 78a9cc640a
commit 67143b1371
42 changed files with 581 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using Content.Shared.GameObjects.Components.Power;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
@@ -16,6 +16,7 @@ namespace Content.Client.GameObjects.Components.Power
private Animation _buildingAnimation;
private Animation _insertingMetalAnimation;
private Animation _insertingGlassAnimation;
private Animation _insertingGoldAnimation;
public override void LoadData(YamlMappingNode node)
{
@@ -24,6 +25,7 @@ namespace Content.Client.GameObjects.Components.Power
_buildingAnimation = PopulateAnimation("protolathe_building", 0.9f);
_insertingMetalAnimation = PopulateAnimation("protolathe_metal", 0.9f);
_insertingGlassAnimation = PopulateAnimation("protolathe_glass", 0.9f);
_insertingGoldAnimation = PopulateAnimation("protolathe_gold", 0.9f);
}
private Animation PopulateAnimation(string sprite, float length)
@@ -87,6 +89,12 @@ namespace Content.Client.GameObjects.Components.Power
animPlayer.Play(_insertingGlassAnimation, AnimationKey);
}
break;
case LatheVisualState.InsertingGold:
if (!animPlayer.HasRunningAnimation(AnimationKey))
{
animPlayer.Play(_insertingGoldAnimation, AnimationKey);
}
break;
default:
throw new ArgumentOutOfRangeException();
}