diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index d5c776954ac..fb5fe8ee57c 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -109,6 +109,8 @@ #define FACTOR_GAS_VISIBLE_MAX 20 /// Mole step for alpha updates. This means alpha can update at 0.25, 0.5, 0.75 and so on #define MOLES_GAS_VISIBLE_STEP 0.25 +/// The total visible states +#define TOTAL_VISIBLE_STATES (FACTOR_GAS_VISIBLE_MAX * (1 / MOLES_GAS_VISIBLE_STEP)) //REACTIONS //return values for reactions (bitflags) diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index cbaeedef865..9b7eceb05be 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -124,7 +124,7 @@ var/gas_meta = gas[GAS_META] var/gas_overlay = gas_meta[META_GAS_OVERLAY] if(gas_overlay && gas[MOLES] > gas_meta[META_GAS_MOLES_VISIBLE]) - new_overlay_types += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(gas[MOLES] / MOLES_GAS_VISIBLE_STEP, 1))] + new_overlay_types += gas_overlay[min(TOTAL_VISIBLE_STATES, CEILING(gas[MOLES] / MOLES_GAS_VISIBLE_STEP, 1))] if (atmos_overlay_types) for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm index 1b0228b7d51..1aae4814e8b 100644 --- a/code/modules/atmospherics/gasmixtures/gas_types.dm +++ b/code/modules/atmospherics/gasmixtures/gas_types.dm @@ -12,9 +12,9 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g gas_info[META_GAS_MOLES_VISIBLE] = initial(gas.moles_visible) if(initial(gas.moles_visible) != null) - gas_info[META_GAS_OVERLAY] = new /list(FACTOR_GAS_VISIBLE_MAX) - for(var/i in 1 to FACTOR_GAS_VISIBLE_MAX) - gas_info[META_GAS_OVERLAY][i] = new /obj/effect/overlay/gas(initial(gas.gas_overlay), i * 255 / FACTOR_GAS_VISIBLE_MAX) + gas_info[META_GAS_OVERLAY] = new /list(TOTAL_VISIBLE_STATES) + for(var/i in 1 to TOTAL_VISIBLE_STATES) + gas_info[META_GAS_OVERLAY][i] = new /obj/effect/overlay/gas(initial(gas.gas_overlay), log(4, (i+0.4*TOTAL_VISIBLE_STATES) / (0.35*TOTAL_VISIBLE_STATES)) * 255) gas_info[META_GAS_FUSION_POWER] = initial(gas.fusion_power) gas_info[META_GAS_DANGER] = initial(gas.dangerous)