Files
GS13NG/code/__HELPERS/_extools_api.dm
Katherine Kiefer 16a490ee5c update auxmos
2023-08-18 22:13:30 +10:00

32 lines
789 B
Plaintext

//#define EXTOOLS_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)
//glob doesn't exist yet at some gas new calls, imma use it anyways
GLOBAL_REAL_VAR(list/__auxtools_initialized) = list()
#define AUXTOOLS_CHECK(LIB)\
if (!__auxtools_initialized[LIB]) {\
if (fexists(LIB)) {\
var/string = call(LIB,"auxtools_init")();\
if(findtext(string, "SUCCESS")) {\
__auxtools_initialized[LIB] = TRUE;\
} else {\
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;\
}\