using Robust.Shared.GameStates;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Electrocution;
///
/// Component for things that shock users on touch.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class ElectrifiedComponent : Component
{
///
/// Check if it is actually electrified at the moment.
///
[DataField, AutoNetworkedField]
public bool Enabled = true;
///
/// Should player get damage on collide
///
[DataField, AutoNetworkedField]
public bool OnBump = true;
///
/// Should player get damage on attack
///
[DataField, AutoNetworkedField]
public bool OnAttacked = true;
///
/// When true - disables power if a window is present in the same tile
///
[DataField, AutoNetworkedField]
public bool NoWindowInTile = false;
///
/// Should player get damage on interact with empty hand
///
[DataField, AutoNetworkedField]
public bool OnHandInteract = true;
///
/// Should player get damage on interact while holding an object in their hand
///
[DataField, AutoNetworkedField]
public bool OnInteractUsing = true;
///
/// Whether the entity should electrocute on activation in world.
///
[DataField, AutoNetworkedField]
public bool OnActivateInWorld = false;
///
/// Indicates if the entity requires power to function
///
[DataField, AutoNetworkedField]
public bool RequirePower = true;
///
/// Indicates if the entity uses APC power
///
[DataField, AutoNetworkedField]
public bool UsesApcPower = false;
///
/// Identifier for the high voltage node.
///
[DataField, AutoNetworkedField]
public string? HighVoltageNode;
///
/// Identifier for the medium voltage node.
///
[DataField, AutoNetworkedField]
public string? MediumVoltageNode;
///
/// Identifier for the low voltage node.
///
[DataField, AutoNetworkedField]
public string? LowVoltageNode;
///
/// Damage multiplier for HV electrocution
///
[DataField, AutoNetworkedField]
public float HighVoltageDamageMultiplier = 3f;
///
/// Shock time multiplier for HV electrocution
///
[DataField, AutoNetworkedField]
public float HighVoltageTimeMultiplier = 2f;
///
/// Damage multiplier for MV electrocution
///
[DataField, AutoNetworkedField]
public float MediumVoltageDamageMultiplier = 2f;
///
/// Shock time multiplier for MV electrocution
///
[DataField, AutoNetworkedField]
public float MediumVoltageTimeMultiplier = 1.5f;
///
/// Base damage to be inflected upon electrocution.
///
[DataField, AutoNetworkedField]
public float ShockDamage = 7.5f;
///
/// Shock time, in seconds.
///
[DataField, AutoNetworkedField]
public float ShockTime = 5f;
///
/// Delay between consecutive shocks
///
[DataField, AutoNetworkedField]
public TimeSpan? ShockDelay;
///
/// When the entity will be able to shock again
///
[DataField(customTypeSerializer:typeof(TimeOffsetSerializer)), AutoNetworkedField, AutoPausedField]
public TimeSpan? NextShock;
/// Base conductivity, is combined coefficient of electrocution targets to check if electrocution attempts works.
///
[DataField, AutoNetworkedField]
public float SiemensCoefficient = 1f;
///
/// Noise to play when shocking.
///
[DataField, AutoNetworkedField]
public SoundSpecifier ShockNoises = new SoundCollectionSpecifier("sparks");
///
/// Sound to play when disabled.
///
[DataField, AutoNetworkedField]
public SoundPathSpecifier AirlockElectrifyDisabled = new("/Audio/Machines/airlock_electrify_off.ogg");
///
/// Sound to play when enabled.
///
[DataField, AutoNetworkedField]
public SoundPathSpecifier AirlockElectrifyEnabled = new("/Audio/Machines/airlock_electrify_on.ogg");
///
/// If sound should be played upon shocking something or someone.
///
[DataField, AutoNetworkedField]
public bool PlaySoundOnShock = true;
///
/// Volume of shock sound.
///
[DataField, AutoNetworkedField]
public float ShockVolume = 20;
///
/// The chance if it would shock someone.
///
[DataField, AutoNetworkedField]
public float Probability = 1f;
///
/// If the power wire of this component is cut, aka no longer electrified.
///
[DataField, AutoNetworkedField]
public bool IsWireCut = false;
}