using Content.Server.Tesla.EntitySystems; using Robust.Shared.Prototypes; namespace Content.Server.Tesla.Components; /// /// Periodically fires electric arcs at surrounding objects. /// [RegisterComponent, Access(typeof(LightningArcShooterSystem)), AutoGenerateComponentPause] public sealed partial class LightningArcShooterComponent : Component { /// /// The number of lightning bolts that are fired at the same time. From 0 to N /// Important balance value: if there aren't a N number of coils or grounders around the tesla, /// the tesla will have a chance to shoot into something important and break. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int MaxLightningArc = 1; /// /// Minimum interval between shooting. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float ShootMinInterval = 0.5f; /// /// Maximum interval between shooting. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float ShootMaxInterval = 8.0f; /// /// the target selection radius for lightning bolts. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float ShootRange = 5f; /// /// How many times after a hit the lightning bolt will bounce into an adjacent target /// [DataField, ViewVariables(VVAccess.ReadWrite)] public int ArcDepth = 1; /// /// The time, upon reaching which the next batch of lightning bolts will be fired. /// [DataField, ViewVariables(VVAccess.ReadWrite)] [AutoPausedField] public TimeSpan NextShootTime; /// /// The type of lightning bolts we shoot /// [DataField, ViewVariables(VVAccess.ReadWrite)] public EntProtoId LightningPrototype = "Lightning"; }