using Content.Shared._Shitmed.Targeting; using Content.Shared.Atmos; namespace Content.Server.Atmos.Components; /// /// Component that can be used to add (or remove) fire stacks when exposed to a type of gas, unless wearing ignition immunity. /// Don't add this component directly, instead attach a body part that has IgniteFromGasPartComponent. /// [RegisterComponent] public sealed partial class IgniteFromGasComponent : Component { /// /// What type of gas triggers ignition. /// Right now only one type of gas can be set, instead of different gasses per each body part. /// [DataField] public Gas Gas; /// /// The total calculated fire stacks to apply every second without immunity. /// [DataField] public float FireStacksPerUpdate = 0f; /// /// If this entity is currently not self-igniting. /// public bool HasImmunity => FireStacksPerUpdate == 0; /// /// The base amount of fire stacks to apply every second without immunity. /// [DataField] public float BaseFireStacksPerUpdate = 0.13f; /// /// The body parts that are vulnerable to ignition when exposed, and their fire stack values. /// [ViewVariables(VVAccess.ReadWrite)] public Dictionary IgnitableBodyParts = new(); /// /// How many moles of the gas is needed to trigger ignition. /// [DataField] public float MolesToIgnite = 0.5f; }