mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 16:05:07 +00:00
* Experiment flag for not caching ref on 515 * Update vv_outfit.dm * MANUAL MIRROR https://github.com/tgstation/tgstation/pull/72657 * MANUAL MIRROR https://github.com/tgstation/tgstation/pull/73788 --------- Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Co-authored-by: lessthnthree <three@lessthanthree.dk> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
25 lines
900 B
Plaintext
25 lines
900 B
Plaintext
#define GLOBAL_PROC "some_magic_bullshit"
|
|
/// A shorthand for the callback datum, [documented here](datum/callback.html)
|
|
#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); \
|
|
}; \
|
|
}
|
|
|
|
/// like CALLBACK but specifically for verb callbacks
|
|
#define VERB_CALLBACK new /datum/callback/verb_callback
|