diff --git a/auxtools.dll b/auxtools.dll index 07e5254e2d..dcd66786a3 100644 Binary files a/auxtools.dll and b/auxtools.dll differ diff --git a/auxtools.pdb b/auxtools.pdb index d6eaa63e47..4ee2c15401 100644 Binary files a/auxtools.pdb and b/auxtools.pdb differ diff --git a/code/__HELPERS/_extools_api.dm b/code/__HELPERS/_extools_api.dm index a8044c2203..6cc4a62be3 100644 --- a/code/__HELPERS/_extools_api.dm +++ b/code/__HELPERS/_extools_api.dm @@ -3,3 +3,9 @@ /proc/extools_log_write() /proc/extools_finalize_logging() + +GLOBAL_VAR_INIT(auxtools_initialized,FALSE) + +#define AUXTOOLS_CHECK\ + if (!GLOB.auxtools_initialized && fexists(AUXTOOLS) && findtext(call(AUXTOOLS,"auxtools_init")(),"SUCCESS"))\ + GLOB.auxtools_initialized = TRUE;\ diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index 66e7ebd424..2a3c1fa37d 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -148,7 +148,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( . = ..() if (!.) // changeturf failed or didn't do anything QDEL_NULL(stashed_air) - update_air_ref() + update_air_ref(TRUE) return var/turf/open/newTurf = . newTurf.air.copy_from(stashed_air) diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index be0c444541..c6a550e884 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -9,12 +9,10 @@ /turf/closed/Initialize() . = ..() - update_air_ref() /turf/closed/AfterChange() . = ..() SSair.high_pressure_delta -= src - update_air_ref() /turf/closed/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) return FALSE @@ -198,13 +196,13 @@ desc = "A wall made out of a strange metal. The squares on it pulse in a predictable pattern." icon = 'icons/turf/walls/hierophant_wall.dmi' icon_state = "wall" - + /turf/closed/indestructible/rock/glacierrock name = "unaturally hard ice wall" desc = "Ice, hardened over thousands of years, you're not breaking through this." icon = 'icons/turf/walls.dmi' icon_state = "snow_rock" - + /turf/closed/indestructible/rock/glacierrock/blue name = "blue ice wall" desc = "The incredible compressive forces that formed this sturdy ice wall gave it a blue color." diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index b150d4930e..1ddb44734e 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -27,7 +27,7 @@ /turf/open/space/Initialize() icon_state = SPACE_ICON_STATE air = space_gas - update_air_ref() + update_air_ref(FALSE) vis_contents.Cut() //removes inherited overlays visibilityChanged() diff --git a/code/game/world.dm b/code/game/world.dm index fd6dcc0572..d99f3f6d36 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -10,10 +10,7 @@ GLOBAL_LIST(topic_status_cache) //So subsystems globals exist, but are not initialised /world/New() - if (fexists(AUXTOOLS)) - var/message = call(AUXTOOLS,"auxtools_init")() - if(message != "SUCCESS") - CRASH("Auxtools failed to load with message [message]!") + AUXTOOLS_CHECK //enable_debugger() #ifdef REFERENCE_TRACKING enable_reference_tracking() diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index eee8859485..2c1baa080a 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -36,9 +36,9 @@ /turf/open/Initialize() if(!blocks_air) - air = new + air = new(2500,src) air.copy_from_turf(src) - update_air_ref() + update_air_ref(!planetary_atmos) . = ..() /turf/open/Destroy() diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index a8add73409..17b6b867bb 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -23,17 +23,16 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list()) var/list/analyzer_results //used for analyzer feedback - not initialized until its used var/_extools_pointer_gasmixture = 0 // Contains the memory address of the shared_ptr object for this gas mixture in c++ land. Don't. Touch. This. Var. -GLOBAL_VAR_INIT(auxmos_initialized,FALSE) +GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE) /proc/auxtools_atmos_init() - CRASH("Auxtools not loaded! Stuff will get messy!") /datum/gas_mixture/New(volume) if (!isnull(volume)) initial_volume = volume - if(!GLOB.auxmos_initialized) - auxtools_atmos_init() - GLOB.auxmos_initialized = TRUE + AUXTOOLS_CHECK + if(!GLOB.auxtools_atmos_initialized && auxtools_atmos_init()) + GLOB.auxtools_atmos_initialized = TRUE __gasmixture_register() reaction_results = new @@ -334,10 +333,6 @@ get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles() /datum/gas_mixture/turf -/datum/gas_mixture/turf/__gasmixture_register() - -/datum/gas_mixture/turf/__gasmixture_unregister() - /* /mob/verb/profile_atmos() /world{loop_checks = 0;}