| 12345678910111213141516171819202122232425262728293031323334353637 |
- using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
- using Content.Server.Explosion.EntitySystems;
- namespace Content.Server.Explosion.Components;
- /// <summary>
- /// A component that electrocutes an entity having this component when a trigger is triggered.
- /// </summary>
- [RegisterComponent, AutoGenerateComponentPause]
- [Access(typeof(TriggerSystem))]
- public sealed partial class ShockOnTriggerComponent : Component
- {
- /// <summary>
- /// The force of an electric shock when the trigger is triggered.
- /// </summary>
- [DataField]
- public int Damage = 5;
- /// <summary>
- /// Duration of electric shock when the trigger is triggered.
- /// </summary>
- [DataField]
- public TimeSpan Duration = TimeSpan.FromSeconds(2);
- /// <summary>
- /// The minimum delay between repeating triggers.
- /// </summary>
- [DataField]
- public TimeSpan Cooldown = TimeSpan.FromSeconds(4);
- /// <summary>
- /// When can the trigger run again?
- /// </summary>
- [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
- [AutoPausedField]
- public TimeSpan NextTrigger = TimeSpan.Zero;
- }
|