mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 08:37:26 +00:00
* 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
26 lines
834 B
C#
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;
|
|
}
|