EnergySwordComponent.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared.Weapons.Melee.EnergySword;
  3. [RegisterComponent, NetworkedComponent, Access(typeof(EnergySwordSystem))]
  4. [AutoGenerateComponentState]
  5. public sealed partial class EnergySwordComponent : Component
  6. {
  7. /// <summary>
  8. /// What color the blade will be when activated.
  9. /// </summary>
  10. [DataField, AutoNetworkedField]
  11. public Color ActivatedColor = Color.DodgerBlue;
  12. /// <summary>
  13. /// A color option list for the random color picker.
  14. /// </summary>
  15. [DataField]
  16. public List<Color> ColorOptions = new()
  17. {
  18. Color.Tomato,
  19. Color.DodgerBlue,
  20. Color.Aqua,
  21. Color.MediumSpringGreen,
  22. Color.MediumOrchid
  23. };
  24. /// <summary>
  25. /// Whether the energy sword has been pulsed by a multitool,
  26. /// causing the blade to cycle RGB colors.
  27. /// </summary>
  28. [DataField, AutoNetworkedField]
  29. public bool Hacked;
  30. /// <summary>
  31. /// RGB cycle rate for hacked e-swords.
  32. /// </summary>
  33. [DataField]
  34. public float CycleRate = 1f;
  35. }