testdir\test_a.dm:8:error: CURSOR_B: undefined var
testdir/test_a.dm
#define CURSOR 'misc.dmi'
client/verb
Test()
var/icon/a = CURSOR
world << a
var/icon/b = CURSOR_B
world << b
testdir/testdir_b/test_b.dm
#define CURSOR_B 'misc.dmi'
client/verb
Test2()
var/icon/a = CURSOR
world << a
var/icon/b = CURSOR_B
world << b
Seems like the define is not functioning when files are not in the same folder? Is there a way to make them work globally instead? Or am I just misunderstanding completely how they work?
This order is typically alphabetic, but is always the order of #includes in the dme file.
The way at least my community handles this is having a folder called __DEFINES in the top level of the code bit of the project. Then you just put defines that are meant to be used globally like this in there, since __ will be ordered before anything else by default.
I'm not sure if there's a better way of going about it, but that's what I do.