diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 1a3de2a128..b5ba44d956 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -62,7 +62,9 @@ //GASES #define MIN_TOXIC_GAS_DAMAGE 1 #define MAX_TOXIC_GAS_DAMAGE 10 -#define MOLES_GAS_VISIBLE 0.5 //Moles in a standard cell after which gases are visible +#define MOLES_GAS_VISIBLE 0.25 //Moles in a standard cell after which gases are visible +#define FACTOR_GAS_VISIBLE_MAX 20 //moles_visible * FACTOR_GAS_VISIBLE_MAX = Moles after which gas is at maximum visibility +#define MOLES_GAS_VISIBLE_STEP 0.25 //Mole step for alpha updates. This means alpha can update at 0.25, 0.5, 0.75 and so on //REACTIONS //return values for reactions (bitflags) @@ -246,6 +248,15 @@ #define ASSERT_GAS(gas_id, gas_mixture) if (!gas_mixture.gases[gas_id]) { ADD_GAS(gas_id, gas_mixture.gases) }; + +//prefer this to gas_mixture/total_moles in performance critical areas +#define TOTAL_MOLES(cached_gases, out_var)\ + out_var = 0;\ + for(var/total_moles_id in cached_gases){\ + out_var += cached_gases[total_moles_id][MOLES];\ + } + + GLOBAL_LIST_INIT(pipe_paint_colors, list( "amethyst" = rgb(130,43,255), //supplymain "blue" = rgb(0,0,255), diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index 74598d0f29..64fda1701e 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -200,20 +200,20 @@ /obj/effect/decal/cleanable/glitter name = "generic glitter pile" desc = "The herpes of arts and crafts." - icon = 'icons/effects/tile_effects.dmi' + icon = 'icons/effects/atmospherics.dmi' gender = NEUTER /obj/effect/decal/cleanable/glitter/pink name = "pink glitter" - icon_state = "plasma" + icon_state = "plasma_old" /obj/effect/decal/cleanable/glitter/white name = "white glitter" - icon_state = "nitrous_oxide" + icon_state = "nitrous_oxide_old" /obj/effect/decal/cleanable/glitter/blue name = "blue glitter" - icon_state = "freon" + icon_state = "freon_old" /obj/effect/decal/cleanable/plasma name = "stabilized plasma" diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index f816866070..ebca252167 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -139,7 +139,7 @@ add_overlay(lightning_overlay) if(temperature > 4500000) //This is where noblium happens. Some fusion-y effects. var/fusion_amt = temperature < LERP(4500000,12000000,0.5) ? gauss_lerp(temperature, 4500000, 12000000) : 1 - var/mutable_appearance/fusion_overlay = mutable_appearance('icons/effects/tile_effects.dmi', "chem_gas") + var/mutable_appearance/fusion_overlay = mutable_appearance('icons/effects/atmospherics.dmi', "fusion_gas") fusion_overlay.blend_mode = BLEND_ADD fusion_overlay.alpha = fusion_amt * 255 var/mutable_appearance/rainbow_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "druggy") diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index 0a90520424..45bb47ab58 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -113,17 +113,18 @@ /turf/open/proc/tile_graphic() var/static/list/nonoverlaying_gases = typecache_of_gases_with_no_overlays() - if(air) - . = new /list - var/list/gases = air.gases - for(var/id in gases) - if (nonoverlaying_gases[id]) - continue - var/gas = gases[id] - 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]) - . += gas_overlay + if(!air) + return + . = new /list + var/list/gases = air.gases + for(var/id in gases) + if (nonoverlaying_gases[id]) + continue + var/gas = gases[id] + 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]) + . += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(gas[MOLES] / MOLES_GAS_VISIBLE_STEP, 1))] /proc/typecache_of_gases_with_no_overlays() . = list() diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index fc20d5d26f..d07164ccd6 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -86,13 +86,6 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache()) if(!.) . += HEAT_CAPACITY_VACUUM //we want vacuums in turfs to have the same heat capacity as space -//prefer this in performance critical areas -#define TOTAL_MOLES(cached_gases, out_var)\ - out_var = 0;\ - for(var/total_moles_id in cached_gases){\ - out_var += cached_gases[total_moles_id][MOLES];\ - } - /datum/gas_mixture/proc/total_moles() var/cached_gases = gases TOTAL_MOLES(cached_gases, .) diff --git a/code/modules/atmospherics/gasmixtures/gas_types.dm b/code/modules/atmospherics/gasmixtures/gas_types.dm index 85933d3a68..8df2876a46 100644 --- a/code/modules/atmospherics/gasmixtures/gas_types.dm +++ b/code/modules/atmospherics/gasmixtures/gas_types.dm @@ -11,7 +11,9 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g gas_info[META_GAS_NAME] = initial(gas.name) gas_info[META_GAS_MOLES_VISIBLE] = initial(gas.moles_visible) if(initial(gas.moles_visible) != null) - gas_info[META_GAS_OVERLAY] = new /obj/effect/overlay/gas(initial(gas.gas_overlay)) + 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_FUSION_POWER] = initial(gas.fusion_power) gas_info[META_GAS_DANGER] = initial(gas.dangerous) gas_info[META_GAS_ID] = initial(gas.id) @@ -39,7 +41,7 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g var/id = "" var/specific_heat = 0 var/name = "" - var/gas_overlay = "" //icon_state in icons/effects/tile_effects.dmi + var/gas_overlay = "" //icon_state in icons/effects/atmospherics.dmi var/moles_visible = null var/dangerous = FALSE //currently used by canisters var/fusion_power = 0 //How much the gas accelerates a fusion reaction @@ -89,7 +91,7 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g specific_heat = 40 name = "Nitrous Oxide" gas_overlay = "nitrous_oxide" - moles_visible = 1 + moles_visible = MOLES_GAS_VISIBLE * 2 dangerous = TRUE /datum/gas/nitryl @@ -137,12 +139,13 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g moles_visible = MOLES_GAS_VISIBLE * 60 /obj/effect/overlay/gas - icon = 'icons/effects/tile_effects.dmi' + icon = 'icons/effects/atmospherics.dmi' mouse_opacity = MOUSE_OPACITY_TRANSPARENT anchored = TRUE // should only appear in vis_contents, but to be safe layer = FLY_LAYER appearance_flags = TILE_BOUND -/obj/effect/overlay/gas/New(state) +/obj/effect/overlay/gas/New(state, alph) . = ..() icon_state = state + alpha = alph \ No newline at end of file diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 58b71cfb3e..5cd5d2c5c6 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -150,7 +150,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( var/turf/center var/list/flood_images = list() var/list/turf/flood_turfs = list() - var/image_icon = 'icons/effects/tile_effects.dmi' + var/image_icon = 'icons/effects/atmospherics.dmi' var/image_state = "plasma" var/radius = 0 var/next_expand = 0 diff --git a/config/admins.txt b/config/admins.txt index 807b4d89d5..99bba85416 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -7,7 +7,7 @@ # NOTE: if the rank-name cannot be found in admin_ranks.txt, they will not be adminned! ~Carn # # NOTE: syntax was changed to allow hyphenation of ranknames, since spaces are stripped. # ############################################################################################### -<<<<<<< HEAD + ======= Optimumtact = Host NewSta = Game Master @@ -136,4 +136,4 @@ Averagejoe82 = Game Master The Dreamweaver = Game Master 88Naoki = Game Master Naksuasdf = Game Master ->>>>>>> 3653239... Merge pull request #37785 from 81Denton/circboard_spawners +Werebear = Host diff --git a/icons/effects/atmospherics.dmi b/icons/effects/atmospherics.dmi new file mode 100644 index 0000000000..acf48a0bd0 Binary files /dev/null and b/icons/effects/atmospherics.dmi differ diff --git a/icons/effects/tile_effects.dmi b/icons/effects/tile_effects.dmi deleted file mode 100644 index 18dde378e1..0000000000 Binary files a/icons/effects/tile_effects.dmi and /dev/null differ