using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
namespace Content.Shared.Speech.Components;
[RegisterComponent]
[NetworkedComponent]
public sealed partial class DamagedSiliconAccentComponent : Component
{
///
/// Enable damage corruption effects
///
[DataField]
public bool EnableDamageCorruption = true;
///
/// Override total damage for damage corruption effects
///
[DataField]
public FixedPoint2? OverrideTotalDamage;
///
/// The probability that a character will be corrupted when total damage at or above .
///
[DataField]
public float MaxDamageCorruption = 0.5f;
///
/// Probability of character corruption will increase linearly to once until
/// total damage is at or above this value.
///
[DataField]
public FixedPoint2 DamageAtMaxCorruption = 300;
///
/// Enable charge level corruption effects
///
[DataField]
public bool EnableChargeCorruption = true;
///
/// Override charge level for charge level corruption effects
///
[DataField]
public float? OverrideChargeLevel;
///
/// If the power cell charge is below this value (as a fraction of maximum charge),
/// power corruption will begin to be applied.
///
[DataField]
public float ChargeThresholdForPowerCorruption = 0.15f;
///
/// Regardless of charge level, this is how many characters at the start of a message will be 100% safe
/// from being dropped.
///
[DataField]
public int StartPowerCorruptionAtCharIdx = 8;
///
/// The probability that a character will be dropped due to charge level will be maximum for characters past
/// this index. This has the effect of longer messages dropping more characters later in the message.
///
[DataField]
public int MaxPowerCorruptionAtCharIdx = 40;
///
/// The maximum probability that a character will be dropped due to charge level.
///
[DataField]
public float MaxDropProbFromPower = 0.5f;
///
/// If a character is "dropped", this is the probability that the character will be turned into a period instead
/// of completely deleting the character.
///
[DataField]
public float ProbToCorruptDotFromPower = 0.6f;
}