diff --git a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs index 7332a5b64b..46444087b9 100644 --- a/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs @@ -149,7 +149,7 @@ namespace Content.Server.Atmos.EntitySystems if (moles >= gas.GasMolesVisible) { opacity[i] = (byte) (ContentHelpers.RoundToLevels( - MathHelper.Clamp01(moles / gas.GasMolesVisibleMax) * 255, byte.MaxValue, _thresholds) * 255 / (_thresholds - 1)); + MathHelper.Clamp01((moles - gas.GasMolesVisible) / (gas.GasMolesVisibleMax - gas.GasMolesVisible)) * 255, byte.MaxValue, _thresholds) * 255 / (_thresholds - 1)); } i++; } @@ -262,7 +262,7 @@ namespace Content.Server.Atmos.EntitySystems // Not all grids have atmospheres. if (!_overlay.TryGetValue(grid, out var gridData)) continue; - + List dataToSend = new(); ev.UpdatedChunks[grid] = dataToSend; diff --git a/Content.Shared/Atmos/Prototypes/GasPrototype.cs b/Content.Shared/Atmos/Prototypes/GasPrototype.cs index b382260fb8..7f42951e0b 100644 --- a/Content.Shared/Atmos/Prototypes/GasPrototype.cs +++ b/Content.Shared/Atmos/Prototypes/GasPrototype.cs @@ -44,7 +44,10 @@ namespace Content.Shared.Atmos.Prototypes /// /// Visibility for this gas will be max after this value. /// - public float GasMolesVisibleMax => GasMolesVisible * Atmospherics.FactorGasVisibleMax; + public float GasMolesVisibleMax => GasMolesVisible * GasVisibilityFactor; + + [DataField("gasVisbilityFactor")] + public float GasVisibilityFactor = Atmospherics.FactorGasVisibleMax; /// /// If this reagent is in gas form, this is the path to the overlay that will be used to make the gas visible. diff --git a/Resources/Prototypes/Atmospherics/gases.yml b/Resources/Prototypes/Atmospherics/gases.yml index 3f08f867b1..b4e0af02ba 100644 --- a/Resources/Prototypes/Atmospherics/gases.yml +++ b/Resources/Prototypes/Atmospherics/gases.yml @@ -66,6 +66,8 @@ molarMass: 44 gasOverlaySprite: /Textures/Effects/atmospherics.rsi gasOverlayState: miasma + gasMolesVisible: 2 + gasVisbilityFactor: 3.5 color: 56941E reagent: Miasma