I propose a compiler directive / if-else that allows it:
#ifexists "config.dm" #define CUSTOM_CONFIG 1 #include "config.dm" #else #define CUSTOM_CONFIG 0 #warn Using default configuration. #include "default_config.dm" #endif
This could be used to bundle a default configuration in a project's repository, without requiring that the end-user gitignore or otherwise tamper with the included one.
It can also be used for cases where a library may or may not be present; for example, Goonstation's current code requires that the user create an empty directory and file because there is no programmatic way to detect the presence of the files or not.