diff --git a/Content.Server/Explosion/EntitySystems/ReleaseGasOnTriggerSystem.cs b/Content.Server/Explosion/EntitySystems/ReleaseGasOnTriggerSystem.cs index 09b6e1bf24..ae3f84f843 100644 --- a/Content.Server/Explosion/EntitySystems/ReleaseGasOnTriggerSystem.cs +++ b/Content.Server/Explosion/EntitySystems/ReleaseGasOnTriggerSystem.cs @@ -66,27 +66,14 @@ public sealed partial class ReleaseGasOnTriggerSystem : SharedReleaseGasOnTrigge RemCompDeferred(uid); continue; } - - if (comp.ExponentialRise) - UpdateExponentialRise(comp, comp.RemoveFraction); } } - /// - /// Updates the RemoveFraction for exponential rise. - /// - /// See https://www.desmos.com/calculator/fx9gfrhoim - private static void UpdateExponentialRise(ReleaseGasOnTriggerComponent comp, float baseFraction) - { - comp.TimesReleased++; - comp.RemoveFraction = 1f - MathF.Pow(1f - baseFraction, comp.TimesReleased); - } - private void UpdateAppearance(Entity entity, bool state) { if (!Resolve(entity, ref entity.Comp, false)) return; - _appearance.SetData(entity, ReleaseGasOnTriggerComponent.ReleaseGasOnTriggerVisuals.Key, state); + _appearance.SetData(entity, ReleaseGasOnTriggerVisuals.Key, state); } } diff --git a/Content.Shared/Explosion/Components/OnTrigger/ReleaseGasOnTriggerComponent.cs b/Content.Shared/Explosion/Components/OnTrigger/ReleaseGasOnTriggerComponent.cs index 5072b89dd2..28a5c5cf81 100644 --- a/Content.Shared/Explosion/Components/OnTrigger/ReleaseGasOnTriggerComponent.cs +++ b/Content.Shared/Explosion/Components/OnTrigger/ReleaseGasOnTriggerComponent.cs @@ -14,16 +14,6 @@ namespace Content.Shared.Explosion.Components.OnTrigger; [Access(typeof(SharedReleaseGasOnTriggerSystem))] public sealed partial class ReleaseGasOnTriggerComponent : Component { - /// - /// Represents visual states for whatever visuals that need to be applied - /// on state changes. - /// - [Serializable] [NetSerializable] - public enum ReleaseGasOnTriggerVisuals : byte - { - Key, - } - /// /// Whether this grenade is active and releasing gas. /// Set to true when triggered, which starts gas release. @@ -37,12 +27,6 @@ public sealed partial class ReleaseGasOnTriggerComponent : Component [DataField] public GasMixture Air; - /// - /// If true, the gas will be released in an exponential manner. - /// - [DataField] - public bool ExponentialRise; - /// /// Time at which the next release will occur. /// This is automatically set when the grenade activates. @@ -53,7 +37,7 @@ public sealed partial class ReleaseGasOnTriggerComponent : Component /// /// The cap at which this grenade can fill the exposed atmosphere to. - /// The grenade automatically deletes itself when the pressure is reached. + /// This component automatically removes itself when the pressure limit is reached. /// /// If set to 101.325, the grenade will only fill the exposed /// atmosphere up to 101.325 kPa. @@ -83,11 +67,14 @@ public sealed partial class ReleaseGasOnTriggerComponent : Component /// Set when the grenade is activated. [DataField(readOnly: true)] public float StartingTotalMoles; - - /// - /// Stores the number of times the grenade has been released, - /// for exponential rise calculations. - /// - [DataField] - public int TimesReleased; +} + +/// +/// Represents visual states for whatever visuals that need to be applied +/// on state changes. +/// +[Serializable, NetSerializable] +public enum ReleaseGasOnTriggerVisuals : byte +{ + Key, }