* Make hacking energy swords predicted * Fix up component, add dirty call * access * Dirty Entity<T> * false
41 lines
1.1 KiB
C#
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;
|
|
}
|