diff --git a/auxmaptick.dll b/auxmaptick.dll new file mode 100644 index 0000000000..cd4f072aa0 Binary files /dev/null and b/auxmaptick.dll differ diff --git a/auxmaptick.pdb b/auxmaptick.pdb new file mode 100644 index 0000000000..d3f1b799c1 Binary files /dev/null and b/auxmaptick.pdb differ diff --git a/auxmos.dll b/auxmos.dll index 55a0bf699e..eaf26d3f90 100644 Binary files a/auxmos.dll and b/auxmos.dll differ diff --git a/auxmos.pdb b/auxmos.pdb index 77f2ec7d8d..d5701c0475 100644 Binary files a/auxmos.pdb and b/auxmos.pdb differ diff --git a/code/__DEFINES/_extools.dm b/code/__DEFINES/_extools.dm index 584f2ffee0..732f7aabc4 100644 --- a/code/__DEFINES/_extools.dm +++ b/code/__DEFINES/_extools.dm @@ -1,2 +1,3 @@ #define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so") -#define AUXTOOLS (world.system_type == MS_WINDOWS ? "auxmos.dll" : "auxmos.so") +#define AUXMOS (world.system_type == MS_WINDOWS ? "auxmos.dll" : "auxmos.so") +#define AUXMAPTICK ((world.system_type == MS_WINDOWS ? "auxmaptick.dll" : "auxmaptick.so")) diff --git a/code/__HELPERS/_extools_api.dm b/code/__HELPERS/_extools_api.dm index 03bbb722af..96c4621306 100644 --- a/code/__HELPERS/_extools_api.dm +++ b/code/__HELPERS/_extools_api.dm @@ -7,13 +7,13 @@ /proc/auxtools_stack_trace(msg) CRASH(msg) -GLOBAL_VAR_INIT(auxtools_initialized,FALSE) +GLOBAL_LIST_EMPTY(auxtools_initialized) -#define AUXTOOLS_CHECK\ - if (!GLOB.auxtools_initialized && fexists(AUXTOOLS) && findtext(call(AUXTOOLS,"auxtools_init")(),"SUCCESS"))\ - GLOB.auxtools_initialized = TRUE;\ +#define AUXTOOLS_CHECK(LIB)\ + if (!GLOB.auxtools_initialized[LIB] && fexists(LIB) && findtext(call(LIB,"auxtools_init")(),"SUCCESS"))\ + GLOB.auxtools_initialized[LIB] = TRUE;\ -#define AUXTOOLS_SHUTDOWN\ - if (GLOB.auxtools_initialized && fexists(AUXTOOLS))\ - call(AUXTOOLS,"auxtools_shutdown")();\ - GLOB.auxtools_initialized = FALSE;\ +#define AUXTOOLS_SHUTDOWN(LIB)\ + if (GLOB.auxtools_initialized[LIB] && fexists(LIB))\ + call(LIB,"auxtools_shutdown")();\ + GLOB.auxtools_initialized[LIB] = FALSE;\ diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 9805af4c74..4ead4497a4 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -280,7 +280,7 @@ SUBSYSTEM_DEF(air) */ /datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0) - if(!process_excited_groups_extools(resumed,MC_TICK_REMAINING_MS)) + if(process_excited_groups_extools(resumed,MC_TICK_REMAINING_MS)) pause() /datum/controller/subsystem/air/proc/process_turfs_extools() diff --git a/code/game/world.dm b/code/game/world.dm index eb143d3a38..aee13790b6 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -9,17 +9,21 @@ GLOBAL_LIST(topic_status_cache) //This happens after the Master subsystem new(s) (it's a global datum) //So subsystems globals exist, but are not initialised +/proc/initialize_maptick() + CRASH("Auxtools is not loaded!") + /world/New() var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL") if (debug_server) call(debug_server, "auxtools_init")() enable_debugging() - AUXTOOLS_CHECK + AUXTOOLS_CHECK(AUXMOS) #ifdef REFERENCE_TRACKING enable_reference_tracking() #endif world.Profile(PROFILE_START) - + AUXTOOLS_CHECK(AUXMAPTICK) + initialize_maptick() log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!") GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.[GUID()].log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl @@ -271,7 +275,8 @@ GLOBAL_LIST(topic_status_cache) /world/Del() shutdown_logging() // makes sure the thread is closed before end, else we terminate - AUXTOOLS_SHUTDOWN + AUXTOOLS_SHUTDOWN(AUXMOS) + AUXTOOLS_SHUTDOWN(AUXMAPTICK) var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL") if (debug_server) call(debug_server, "auxtools_shutdown")() diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm index 23005b7cd7..54f83c9221 100644 --- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm +++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm @@ -30,7 +30,7 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE) /datum/gas_mixture/New(volume) if (!isnull(volume)) initial_volume = volume - AUXTOOLS_CHECK + AUXTOOLS_CHECK(AUXMOS) if(!GLOB.auxtools_atmos_initialized && auxtools_atmos_init()) GLOB.auxtools_atmos_initialized = TRUE __gasmixture_register()