Files
Delta-v/Content.Shared/_ES/Sparks/Components/ESSparkCooldownComponent.cs
T
Nemanja 132b3d829d Hark, Sparks! (#491)
* Basic improvements to sparks

* Pull spark configuration out of SparkOnHit component

* Add various sparks to tasers, batons, RCD

* Add sparks back to electrocution

* Adjust new projectiles

* Tile fires on cable cuts

* That's a terrible idea, actually

* Add a custom PreventCollide system

* Make the new prevent collide component prevent collisions
2026-05-30 09:16:20 -04:00

26 lines
834 B
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared._ES.Sparks.Components;
/// <summary>
/// Component that tracks cooldown for spawning sparks on an entity.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentPause]
[Access(typeof(ESSparksSystem))]
public sealed partial class ESSparkCooldownComponent : Component
{
/// <summary>
/// Minimum time inbetween sparks occuring from hits.
/// Used to reduce spark spam.
/// </summary>
[DataField]
public TimeSpan SparkDelay = TimeSpan.FromSeconds(0.25f);
/// <summary>
/// The last time that a spark occured.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan LastSparkTime;
}