mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-13 02:42:32 +00:00
* sdf * fsda * fuck * fuck2 * toolz * sdaf * sdfa * saf * sdfa * sdfa * sdf * sdfa * temp rename * temp rename * temp rename * sdaf * the pain is immensurable in the land of byond * the curse of rah * safd * sadf * sadf * gf * asf * fssdfa * sfd * sadf * sfda * brah * brah * it's easier for you to fix this * ffs * brah * brah
20 lines
668 B
Plaintext
20 lines
668 B
Plaintext
#define CALLBACK new /datum/callback
|
|
|
|
///Per the DM reference, spawn(-1) will execute the spawned code immediately until a block is met.
|
|
#define MAKE_SPAWN_ACT_LIKE_WAITFOR -1
|
|
///Create a codeblock that will not block the callstack if a block is met.
|
|
#define ASYNC spawn(MAKE_SPAWN_ACT_LIKE_WAITFOR)
|
|
|
|
#define INVOKE_ASYNC(proc_owner, proc_path, proc_arguments...) \
|
|
if ((proc_owner) == GLOBAL_PROC) { \
|
|
ASYNC { \
|
|
call(proc_path)(##proc_arguments); \
|
|
}; \
|
|
} \
|
|
else { \
|
|
ASYNC { \
|
|
/* Written with `0 ||` to avoid the compiler seeing call("string"), and thinking it's a deprecated DLL */ \
|
|
call(0 || proc_owner, proc_path)(##proc_arguments); \
|
|
}; \
|
|
}
|