From: Holger Schemel Date: Sun, 12 Jun 2022 13:30:28 +0000 (+0200) Subject: added support for fallback text file for element description files X-Git-Tag: 4.3.2.2~6 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0c5427e607bcc1b34dde35616d39c768fc4be184;p=rocksndiamonds.git added support for fallback text file for element description files --- diff --git a/src/editor.c b/src/editor.c index 106176b9..e5d95670 100644 --- a/src/editor.c +++ b/src/editor.c @@ -5651,6 +5651,11 @@ static char *getElementDescriptionFilename(int element) if (filename != NULL) return filename; + // 3rd try: look for generic fallback text file for any element + filename = getElementDescriptionFilenameExt(FALLBACK_TEXT_FILENAME); + if (filename != NULL) + return filename; + return NULL; } diff --git a/src/libgame/system.h b/src/libgame/system.h index 4b57594d..a3d94efd 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -703,6 +703,8 @@ #define GAMECONTROLLER_BASENAME "gamecontrollerdb.txt" +#define FALLBACK_TEXT_FILENAME "fallback.txt" + #define LOG_OUT_BASENAME "stdout.txt" #define LOG_ERR_BASENAME "stderr.txt"