-
Notifications
You must be signed in to change notification settings - Fork 675
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Electric anomaly rework" (#23546)
Revert "Electric anomaly rework (#23173)" This reverts commit 05ee6eb.
- Loading branch information
Showing
3 changed files
with
39 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 8 additions & 20 deletions
28
Content.Shared/Anomaly/Effects/Components/ElectricityAnomalyComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,53 @@ | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; | ||
|
||
namespace Content.Shared.Anomaly.Effects.Components; | ||
|
||
[RegisterComponent] | ||
public sealed partial class ElectricityAnomalyComponent : Component | ||
{ | ||
/// <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; | ||
|
||
/// <summary> | ||
/// The maximum radius of the passive electrocution effect | ||
/// scales with stability | ||
/// </summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("maxElectrocutionRange"), ViewVariables(VVAccess.ReadWrite)] | ||
public float MaxElectrocuteRange = 7f; | ||
|
||
/// <summary> | ||
/// The maximum amount of damage the electrocution can do | ||
/// scales with severity | ||
/// </summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("maxElectrocuteDamage"), ViewVariables(VVAccess.ReadWrite)] | ||
public float MaxElectrocuteDamage = 20f; | ||
|
||
/// <summary> | ||
/// The maximum amount of time the electrocution lasts | ||
/// scales with severity | ||
/// </summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("maxElectrocuteDuration"), ViewVariables(VVAccess.ReadWrite)] | ||
public TimeSpan MaxElectrocuteDuration = TimeSpan.FromSeconds(8); | ||
|
||
/// <summary> | ||
/// The maximum chance that each second, when in range of the anomaly, you will be electrocuted. | ||
/// scales with stability | ||
/// </summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("passiveElectrocutionChance"), ViewVariables(VVAccess.ReadWrite)] | ||
public float PassiveElectrocutionChance = 0.05f; | ||
|
||
/// <summary> | ||
/// Used for tracking seconds, so that we can shock people in a non-tick-dependent way. | ||
/// </summary> | ||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("nextSecond", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] | ||
public TimeSpan NextSecond = TimeSpan.Zero; | ||
|
||
/// <summary> | ||
/// Energy consumed from devices by the emp pulse upon going supercritical. | ||
/// <summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("empEnergyConsumption"), ViewVariables(VVAccess.ReadWrite)] | ||
public float EmpEnergyConsumption = 100000f; | ||
|
||
/// <summary> | ||
/// Duration of devices being disabled by the emp pulse upon going supercritical. | ||
/// <summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
[DataField("empDisabledDuration"), ViewVariables(VVAccess.ReadWrite)] | ||
public float EmpDisabledDuration = 60f; | ||
} |