VaporVisualsComponent.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. using Robust.Client.Animations;
  2. namespace Content.Client.Chemistry.Visualizers;
  3. /// <summary>
  4. /// A component that plays an animation when it is sprayed.
  5. /// </summary>
  6. [RegisterComponent]
  7. [Access(typeof(VaporVisualizerSystem))]
  8. public sealed partial class VaporVisualsComponent : Component
  9. {
  10. /// <summary>
  11. /// The id of the animation played when the vapor spawns in.
  12. /// </summary>
  13. public const string AnimationKey = "flick_animation";
  14. /// <summary>
  15. /// The amount of time over which the spray animation is played.
  16. /// </summary>
  17. [DataField("animationTime")]
  18. public float AnimationTime = 0.25f;
  19. /// <summary>
  20. /// The RSI state that is flicked when the vapor is sprayed.
  21. /// </summary>
  22. [DataField("animationState")]
  23. public string AnimationState = "chempuff";
  24. /// <summary>
  25. /// The animation that plays when the vapor is sprayed.
  26. /// Generated in <see cref="VaporVisualizerSystem.OnComponentInit"/>
  27. /// </summary>
  28. public Animation VaporFlick = default!;
  29. }