Files
Yogstation/code/__HELPERS/_extools_api.dm
Katherine Kiefer 108b4114e0 guh
2022-10-04 11:53:14 +11:00

31 lines
782 B
Plaintext

//#define AUXOOLS_LOGGING // rust_g is used as a fallback if this is undefined
/proc/extools_log_write()
/proc/extools_finalize_logging()
/proc/auxtools_stack_trace(msg)
CRASH(msg)
//this exists because gases may be created when the MC doesn't exist yet
GLOBAL_REAL_VAR(/list/__auxtools_initialized) = list()
#define AUXTOOLS_CHECK(LIB)\
if (!__auxtools_initialized[LIB]) {\
if (fexists(LIB)) {\
var/string = call(LIB,"auxtools_init")();\
__auxtools_initialized[LIB] = TRUE;\
if(!findtext(string, "SUCCESS")) {\
CRASH(string);\
}\
} else {\
CRASH("No file named [LIB] found!")\
}\
}\
#define AUXTOOLS_SHUTDOWN(LIB)\
if (__auxtools_initialized[LIB] && fexists(LIB)){\
call(LIB,"auxtools_shutdown")();\
__auxtools_initialized[LIB] = FALSE;\
}\