Preprocessor: #ifinc (or something to that effect) in Feature Requests
|
|
|
|
| Status: |
Open
Issue hasn't been assigned a status value.
|
|
|
I need a method to quickly and easily determine whether or not a file has been included in the DME or not and be able to write code accordingly. So in the spirit of #ifdef, I've come up with this.
mob verb test() #ifinc "myfile.dm" myProc() #else myOtherProc() #endif
|
It would be possible for me to keep track of included files within the code itself, but then I'd lose that lovely feeling I get knowing my code will still compile the second I uncheck a file in the file-tree.
Naturally, this little devil could also be used for files within the BYOND library bin:
mob verb test() #ifinc <tiberath.myusefulbutunnecessarylib> myProc() #else myOtherProc() #endif
|
|