Files
tbd-station-14/Content.Server/GameObjects/Components/Weapon/Melee/FlashComponent.cs
mirrorcult f744b655b8 Refactor MeleeWeaponComponent and related comps to be ECS (#4133)
* move everything to MeleeWeaponSystem

* refactor MeleeChemicalInjector

* hypospray and flash refactor

* stunbaton refactor

* bugfixes

* flash afterinteract

* resolve issues

* props

* playing the slots

* MeleeInteractEvent + bugfixes

* spear can actually use MeleeChemicalInjector
2021-06-05 09:20:52 +02:00

37 lines
1.0 KiB
C#

using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Weapon.Melee
{
[RegisterComponent]
public class FlashComponent : Component
{
public override string Name => "Flash";
[DataField("duration")]
[ViewVariables(VVAccess.ReadWrite)]
public int FlashDuration { get; set; } = 5000;
[DataField("uses")]
[ViewVariables(VVAccess.ReadWrite)]
public int Uses { get; set; } = 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;
public bool Flashing;
public bool HasUses => Uses > 0;
}
}