Files
tbd-station-14/Content.Shared/Weapons/Melee/EnergySword/EnergySwordComponent.cs
Plykiya 0d9f9e9615 Make hacking energy swords predicted (#34877)
* Make hacking energy swords predicted

* Fix up component, add dirty call

* access

* Dirty Entity<T>

* false
2025-02-05 20:48:28 +01:00

41 lines
1.1 KiB
C#

using Robust.Shared.GameStates;
namespace Content.Shared.Weapons.Melee.EnergySword;
[RegisterComponent, NetworkedComponent, Access(typeof(EnergySwordSystem))]
[AutoGenerateComponentState]
public sealed partial class EnergySwordComponent : Component
{
/// <summary>
/// What color the blade will be when activated.
/// </summary>
[DataField, AutoNetworkedField]
public Color ActivatedColor = Color.DodgerBlue;
/// <summary>
/// A color option list for the random color picker.
/// </summary>
[DataField]
public List<Color> ColorOptions = new()
{
Color.Tomato,
Color.DodgerBlue,
Color.Aqua,
Color.MediumSpringGreen,
Color.MediumOrchid
};
/// <summary>
/// Whether the energy sword has been pulsed by a multitool,
/// causing the blade to cycle RGB colors.
/// </summary>
[DataField, AutoNetworkedField]
public bool Hacked;
/// <summary>
/// RGB cycle rate for hacked e-swords.
/// </summary>
[DataField]
public float CycleRate = 1f;
}