* use file namespace * shorter systems name * replace SoundSystem with AudioSystem * refactor update function * refactor * refactor 2 * remove setters * uh oh * remove getters * active checks * refactor 3 * better way * update state * have to remove this for now * move electrified component to shared * forgot this * fix airlocks * add effect * Revert "move electrified component to shared" This reverts commit 6457e8fc9c3b674a705a61034831ce6f084e2b01. * Revert "forgot this" This reverts commit ed361cee2d5b8b958830ba0af07fcc2627eb7845. * functioning effects * use animation by Aleksh * make effect part of grille * optimisation? * remove timing * file name * only activate when touched * refactor electrocution comp too * make it 1 sec * formatting * replace all entity query with enumerator * queue del
77 lines
1.9 KiB
C#
77 lines
1.9 KiB
C#
using Robust.Shared.Audio;
|
|
|
|
namespace Content.Server.Electrocution;
|
|
|
|
/// <summary>
|
|
/// Component for things that shock users on touch.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed class ElectrifiedComponent : Component
|
|
{
|
|
[DataField("enabled")]
|
|
public bool Enabled = true;
|
|
|
|
[DataField("onBump")]
|
|
public bool OnBump = true;
|
|
|
|
[DataField("onAttacked")]
|
|
public bool OnAttacked = true;
|
|
|
|
[DataField("noWindowInTile")]
|
|
public bool NoWindowInTile = false;
|
|
|
|
[DataField("onHandInteract")]
|
|
public bool OnHandInteract = true;
|
|
|
|
[DataField("onInteractUsing")]
|
|
public bool OnInteractUsing = true;
|
|
|
|
[DataField("requirePower")]
|
|
public bool RequirePower = true;
|
|
|
|
[DataField("usesApcPower")]
|
|
public bool UsesApcPower = false;
|
|
|
|
[DataField("highVoltageNode")]
|
|
public string? HighVoltageNode;
|
|
|
|
[DataField("mediumVoltageNode")]
|
|
public string? MediumVoltageNode;
|
|
|
|
[DataField("lowVoltageNode")]
|
|
public string? LowVoltageNode;
|
|
|
|
[DataField("highVoltageDamageMultiplier")]
|
|
public float HighVoltageDamageMultiplier = 3f;
|
|
|
|
[DataField("highVoltageTimeMultiplier")]
|
|
public float HighVoltageTimeMultiplier = 1.5f;
|
|
|
|
[DataField("mediumVoltageDamageMultiplier")]
|
|
public float MediumVoltageDamageMultiplier = 2f;
|
|
|
|
[DataField("mediumVoltageTimeMultiplier")]
|
|
public float MediumVoltageTimeMultiplier = 1.25f;
|
|
|
|
[DataField("shockDamage")]
|
|
public int ShockDamage = 20;
|
|
|
|
/// <summary>
|
|
/// Shock time, in seconds.
|
|
/// </summary>
|
|
[DataField("shockTime")]
|
|
public float ShockTime = 8f;
|
|
|
|
[DataField("siemensCoefficient")]
|
|
public float SiemensCoefficient = 1f;
|
|
|
|
[DataField("shockNoises")]
|
|
public SoundSpecifier ShockNoises = new SoundCollectionSpecifier("sparks");
|
|
|
|
[DataField("playSoundOnShock")]
|
|
public bool PlaySoundOnShock = true;
|
|
|
|
[DataField("shockVolume")]
|
|
public float ShockVolume = 20;
|
|
}
|