Files
tbd-station-14/Content.Shared/Flash/Components/FlashComponent.cs
Nemanja 3af744e4a9 Flash buff (#25730)
* flash buff

* oops!

* bool

* 3 -> 1.5 seconds

* okay fix

* sluth
2024-04-18 16:30:01 +10:00

47 lines
1.4 KiB
C#

using Content.Shared.Flash;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Flash.Components
{
[RegisterComponent, NetworkedComponent, Access(typeof(SharedFlashSystem))]
public sealed partial class FlashComponent : Component
{
[DataField("duration")]
[ViewVariables(VVAccess.ReadWrite)]
public int FlashDuration { get; set; } = 5000;
/// <summary>
/// How long a target is stunned when a melee flash is used.
/// If null, melee flashes will not stun at all
/// </summary>
[DataField]
public TimeSpan? MeleeStunDuration = TimeSpan.FromSeconds(1.5);
[DataField("range")]
[ViewVariables(VVAccess.ReadWrite)]
public float Range { get; set; } = 7f;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("aoeFlashDuration")]
public int AoeFlashDuration { get; set; } = 2000;
[DataField("slowTo")]
[ViewVariables(VVAccess.ReadWrite)]
public float SlowTo { get; set; } = 0.5f;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("sound")]
public SoundSpecifier Sound { get; set; } = new SoundPathSpecifier("/Audio/Weapons/flash.ogg")
{
Params = AudioParams.Default.WithVolume(1f).WithMaxDistance(3f)
};
public bool Flashing;
[DataField]
public float Probability = 1f;
}
}