Make miasma start being visible later (#10128)
This commit is contained in:
@@ -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<GasOverlayChunk> dataToSend = new();
|
||||
ev.UpdatedChunks[grid] = dataToSend;
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
molarMass: 44
|
||||
gasOverlaySprite: /Textures/Effects/atmospherics.rsi
|
||||
gasOverlayState: miasma
|
||||
gasMolesVisible: 2
|
||||
gasVisbilityFactor: 3.5
|
||||
color: 56941E
|
||||
reagent: Miasma
|
||||
|
||||
|
||||
Reference in New Issue
Block a user