2024-01-05 13:14:10 +11:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
2023-02-06 00:03:53 -05:00
|
|
|
|
|
|
|
|
namespace Content.Shared.Anomaly.Effects.Components;
|
2023-01-17 00:05:20 -05:00
|
|
|
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class ElectricityAnomalyComponent : Component
|
2023-01-17 00:05:20 -05:00
|
|
|
{
|
2024-01-05 13:14:10 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// the minimum number of lightning strikes
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public int MinBoltCount = 2;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// the number of lightning strikes, at the maximum severity of the anomaly
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public int MaxBoltCount = 5;
|
|
|
|
|
|
2023-02-06 00:03:53 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum radius of the passive electrocution effect
|
|
|
|
|
/// scales with stability
|
|
|
|
|
/// </summary>
|
2024-01-05 13:14:10 +11:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-02-06 00:03:53 -05:00
|
|
|
public float MaxElectrocuteRange = 7f;
|
2023-01-17 00:05:20 -05:00
|
|
|
|
2023-02-06 00:03:53 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum amount of damage the electrocution can do
|
|
|
|
|
/// scales with severity
|
|
|
|
|
/// </summary>
|
2024-01-05 13:14:10 +11:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-01-17 00:05:20 -05:00
|
|
|
public float MaxElectrocuteDamage = 20f;
|
|
|
|
|
|
2023-02-06 00:03:53 -05:00
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum amount of time the electrocution lasts
|
|
|
|
|
/// scales with severity
|
|
|
|
|
/// </summary>
|
2024-01-05 13:14:10 +11:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-01-17 00:05:20 -05:00
|
|
|
public TimeSpan MaxElectrocuteDuration = TimeSpan.FromSeconds(8);
|
2023-02-06 00:03:53 -05:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The maximum chance that each second, when in range of the anomaly, you will be electrocuted.
|
|
|
|
|
/// scales with stability
|
|
|
|
|
/// </summary>
|
2024-01-05 13:14:10 +11:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-02-06 00:03:53 -05:00
|
|
|
public float PassiveElectrocutionChance = 0.05f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Used for tracking seconds, so that we can shock people in a non-tick-dependent way.
|
|
|
|
|
/// </summary>
|
2024-01-05 13:14:10 +11:00
|
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
|
2023-02-06 00:03:53 -05:00
|
|
|
public TimeSpan NextSecond = TimeSpan.Zero;
|
2023-04-24 00:11:23 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Energy consumed from devices by the emp pulse upon going supercritical.
|
|
|
|
|
/// <summary>
|
2024-01-05 13:14:10 +11:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-04-24 00:11:23 +00:00
|
|
|
public float EmpEnergyConsumption = 100000f;
|
2023-05-07 01:26:04 +10:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Duration of devices being disabled by the emp pulse upon going supercritical.
|
|
|
|
|
/// <summary>
|
2024-01-05 13:14:10 +11:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-05-07 01:26:04 +10:00
|
|
|
public float EmpDisabledDuration = 60f;
|
2023-01-17 00:05:20 -05:00
|
|
|
}
|