diff --git a/byond-extools.dll b/byond-extools.dll index a83ea1e543..7c45514fe2 100644 Binary files a/byond-extools.dll and b/byond-extools.dll differ diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index 881f8d064b..c609bdd230 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -284,8 +284,9 @@ GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0)) GLOBAL_VAR(atmos_extools_initialized) // this must be an uninitialized (null) one or init_fastmos will be called twice because reasons #define ATMOS_EXTOOLS_CHECK if(!GLOB.atmos_extools_initialized){\ GLOB.atmos_extools_initialized=TRUE;\ - if(fexists(world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so")){\ - var/result = call((world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so"),"init_fastmos")();\ + var/extools = world.GetConfig("env", "EXTOOLS_DLL") || "./byond-extools.dll";\ + if(fexists(extools)){\ + var/result = call(extools,"init_fastmos")();\ if(result != "ok") {CRASH(result);}\ } else {\ CRASH("byond-extools.dll does not exist!");\ diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 7993599a13..64e03cbd88 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -172,9 +172,12 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list()) /datum/gas_mixture/react(datum/holder) . = NO_REACTION + if(!total_moles()) + return var/list/reactions = list() - for(var/I in get_gases()) - reactions += SSair.gas_reactions[I] + for(var/datum/gas_reaction/G in SSair.gas_reactions) + if(get_moles(G.major_gas)) + reactions += G if(!length(reactions)) return reaction_results = new @@ -195,9 +198,22 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list()) continue if(get_moles(id) < min_reqs[id]) continue reaction_loop + //at this point, all minimum requirements for the reaction are satisfied. + /* currently no reactions have maximum requirements, so we can leave the checks commented out for a slight performance boost + PLEASE DO NOT REMOVE THIS CODE. the commenting is here only for a performance increase. + enabling these checks should be as easy as possible and the fact that they are disabled should be as clear as possible + var/list/max_reqs = reaction.max_requirements + if((max_reqs["TEMP"] && temp > max_reqs["TEMP"]) \ + || (max_reqs["ENER"] && ener > max_reqs["ENER"])) + continue + for(var/id in max_reqs) + if(id == "TEMP" || id == "ENER") + continue + if(cached_gases[id] && cached_gases[id][MOLES] > max_reqs[id]) + continue reaction_loop //at this point, all requirements for the reaction are satisfied. we can now react() - + */ . |= reaction.react(src, holder) if (. & STOP_REACTIONS) break diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm index 6f7d92c719..bcf2e6f134 100644 --- a/code/modules/atmospherics/machinery/components/components_base.dm +++ b/code/modules/atmospherics/machinery/components/components_base.dm @@ -15,8 +15,7 @@ ..() for(var/i in 1 to device_type) - var/datum/gas_mixture/A = new - A.set_volume(200) + var/datum/gas_mixture/A = new(200) airs[i] = A // Iconnery diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index 6ae032fae2..81a0e0bc40 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -18,8 +18,7 @@ ..() SSair.atmos_machinery += src - air_contents = new - air_contents.set_volume(volume) + air_contents = new(volume) air_contents.set_temperature(T20C) return 1