Electrified grille sparks effect (#15178)
* 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
This commit is contained in:
@@ -1,77 +1,76 @@
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Electrocution
|
||||
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>
|
||||
/// Component for things that shock users on touch.
|
||||
/// Shock time, in seconds.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ElectrifiedComponent : Component
|
||||
{
|
||||
[DataField("enabled")]
|
||||
public bool Enabled { get; set; } = true;
|
||||
[DataField("shockTime")]
|
||||
public float ShockTime = 8f;
|
||||
|
||||
[DataField("onBump")]
|
||||
public bool OnBump { get; set; } = true;
|
||||
[DataField("siemensCoefficient")]
|
||||
public float SiemensCoefficient = 1f;
|
||||
|
||||
[DataField("onAttacked")]
|
||||
public bool OnAttacked { get; set; } = true;
|
||||
[DataField("shockNoises")]
|
||||
public SoundSpecifier ShockNoises = new SoundCollectionSpecifier("sparks");
|
||||
|
||||
[DataField("noWindowInTile")]
|
||||
public bool NoWindowInTile { get; set; } = false;
|
||||
[DataField("playSoundOnShock")]
|
||||
public bool PlaySoundOnShock = true;
|
||||
|
||||
[DataField("onHandInteract")]
|
||||
public bool OnHandInteract { get; set; } = true;
|
||||
|
||||
[DataField("onInteractUsing")]
|
||||
public bool OnInteractUsing { get; set; } = true;
|
||||
|
||||
[DataField("requirePower")]
|
||||
public bool RequirePower { get; } = true;
|
||||
|
||||
[DataField("usesApcPower")]
|
||||
public bool UsesApcPower { get; } = false;
|
||||
|
||||
[DataField("highVoltageNode")]
|
||||
public string? HighVoltageNode { get; }
|
||||
|
||||
[DataField("mediumVoltageNode")]
|
||||
public string? MediumVoltageNode { get; }
|
||||
|
||||
[DataField("lowVoltageNode")]
|
||||
public string? LowVoltageNode { get; }
|
||||
|
||||
[DataField("highVoltageDamageMultiplier")]
|
||||
public float HighVoltageDamageMultiplier { get; } = 3f;
|
||||
|
||||
[DataField("highVoltageTimeMultiplier")]
|
||||
public float HighVoltageTimeMultiplier { get; } = 1.5f;
|
||||
|
||||
[DataField("mediumVoltageDamageMultiplier")]
|
||||
public float MediumVoltageDamageMultiplier { get; } = 2f;
|
||||
|
||||
[DataField("mediumVoltageTimeMultiplier")]
|
||||
public float MediumVoltageTimeMultiplier { get; } = 1.25f;
|
||||
|
||||
[DataField("shockDamage")]
|
||||
public int ShockDamage { get; } = 20;
|
||||
|
||||
/// <summary>
|
||||
/// Shock time, in seconds.
|
||||
/// </summary>
|
||||
[DataField("shockTime")]
|
||||
public float ShockTime { get; } = 8f;
|
||||
|
||||
[DataField("siemensCoefficient")]
|
||||
public float SiemensCoefficient { get; } = 1f;
|
||||
|
||||
[DataField("shockNoises")]
|
||||
public SoundSpecifier ShockNoises { get; } = new SoundCollectionSpecifier("sparks");
|
||||
|
||||
[DataField("playSoundOnShock")]
|
||||
public bool PlaySoundOnShock { get; } = true;
|
||||
|
||||
[DataField("shockVolume")]
|
||||
public float ShockVolume { get; } = 20;
|
||||
}
|
||||
[DataField("shockVolume")]
|
||||
public float ShockVolume = 20;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user