From 664c2a0a83ea095a074ae23f827a51c7127ebefa Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Sun, 25 Jul 2021 17:10:07 -0700 Subject: [PATCH] better erroring when auxtools not found --- code/__HELPERS/_extools_api.dm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/__HELPERS/_extools_api.dm b/code/__HELPERS/_extools_api.dm index 8605c6a975..7bff3f06c0 100644 --- a/code/__HELPERS/_extools_api.dm +++ b/code/__HELPERS/_extools_api.dm @@ -10,12 +10,16 @@ GLOBAL_LIST_EMPTY(auxtools_initialized) #define AUXTOOLS_CHECK(LIB)\ - if (!GLOB.auxtools_initialized[LIB] && fexists(LIB)) {\ - var/string = call(LIB,"auxtools_init")();\ - if(findtext(string, "SUCCESS")) {\ - GLOB.auxtools_initialized[LIB] = TRUE;\ + if (!GLOB.auxtools_initialized[LIB]) {\ + if (fexists(LIB)) {\ + var/string = call(LIB,"auxtools_init")();\ + if(findtext(string, "SUCCESS")) {\ + GLOB.auxtools_initialized[LIB] = TRUE;\ + } else {\ + CRASH(string);\ + }\ } else {\ - CRASH(string);\ + CRASH("No file named [LIB] found!")\ }\ }\