Make miasma start being visible later (#10128)

This commit is contained in:
Rane
2022-07-28 23:13:56 -04:00
committed by GitHub
parent c621712f49
commit 47e84d9d54
3 changed files with 8 additions and 3 deletions

View File

@@ -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++;
}

View File

@@ -44,7 +44,10 @@ namespace Content.Shared.Atmos.Prototypes
/// <summary>
/// Visibility for this gas will be max after this value.
/// </summary>
public float GasMolesVisibleMax => GasMolesVisible * Atmospherics.FactorGasVisibleMax;
public float GasMolesVisibleMax => GasMolesVisible * GasVisibilityFactor;
[DataField("gasVisbilityFactor")]
public float GasVisibilityFactor = Atmospherics.FactorGasVisibleMax;
/// <summary>
/// If this reagent is in gas form, this is the path to the overlay that will be used to make the gas visible.

View File

@@ -66,6 +66,8 @@
molarMass: 44
gasOverlaySprite: /Textures/Effects/atmospherics.rsi
gasOverlayState: miasma
gasMolesVisible: 2
gasVisbilityFactor: 3.5
color: 56941E
reagent: Miasma