2024-02-01 07:29:01 -06:00
|
|
|
using Content.Shared.Flash;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2024-02-01 07:29:01 -06:00
|
|
|
using Robust.Shared.GameStates;
|
2020-07-06 16:37:39 -05:00
|
|
|
|
2024-02-01 07:29:01 -06:00
|
|
|
namespace Content.Shared.Flash.Components
|
2020-07-06 16:37:39 -05:00
|
|
|
{
|
2024-02-01 07:29:01 -06:00
|
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedFlashSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class FlashComponent : Component
|
2020-07-06 16:37:39 -05:00
|
|
|
{
|
2024-01-04 05:27:32 -07:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[DataField("duration")]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public int FlashDuration { get; set; } = 5000;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[DataField("range")]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float Range { get; set; } = 7f;
|
2020-07-06 16:37:39 -05:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("aoeFlashDuration")]
|
|
|
|
|
public int AoeFlashDuration { get; set; } = 2000;
|
2020-07-06 16:37:39 -05:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
[DataField("slowTo")]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float SlowTo { get; set; } = 0.5f;
|
2020-07-06 16:37:39 -05:00
|
|
|
|
2021-07-10 17:35:33 +02:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("sound")]
|
2024-01-04 05:27:32 -07:00
|
|
|
public SoundSpecifier Sound { get; set; } = new SoundPathSpecifier("/Audio/Weapons/flash.ogg")
|
|
|
|
|
{
|
|
|
|
|
Params = AudioParams.Default.WithVolume(1f).WithMaxDistance(3f)
|
|
|
|
|
};
|
2021-07-10 17:35:33 +02:00
|
|
|
|
2021-06-05 00:20:52 -07:00
|
|
|
public bool Flashing;
|
2020-07-06 16:37:39 -05:00
|
|
|
}
|
|
|
|
|
}
|