Files
Aurora.3/code/__defines/byond_compat.dm
Fluffy b752616c98 Spacemandmm galore #1 (#16672)
* dmdoc + Initialize

* no errors anymore

* removed duplicate comment, expanded the other

* changelog

* gdf

* fix emotes F4
2023-09-14 10:39:15 +00:00

58 lines
1.5 KiB
Plaintext

// 515 split call for external libraries into call_ext
#if DM_VERSION < 515
#define LIBCALL call
#else
#define LIBCALL call_ext
#endif
// So we want to have compile time guarantees these procs exist on local type, unfortunately 515 killed the .proc/procname syntax so we have to use nameof()
#if DM_VERSION < 515
/**
* Call by name proc reference, checks if the proc exists on this type or as a global proc
*
* * X - The proc name
*/
#define PROC_REF(X) (.proc/##X)
/**
* Call by name proc reference, checks if the proc exists on given type or as a global proc
*
* * TYPE - The type (eg. `/datum/something` or `/atom`), without trailing slash
* * X - The proc name
*/
#define TYPE_PROC_REF(TYPE, X) (##TYPE.proc/##X)
/**
* Call by name proc reference, checks if the proc is existing global proc
*
* * X - The proc name
*/
#define GLOBAL_PROC_REF(X) (/proc/##X)
#else
/**
* Call by name proc reference, checks if the proc exists on this type or as a global proc
*
* * X - The proc name
*/
#define PROC_REF(X) (nameof(.proc/##X))
/**
* Call by name proc reference, checks if the proc exists on given type or as a global proc
*
* * TYPE - The type (eg. `/datum/something` or `/atom`), without trailing slash
* * X - The proc name
*/
#define TYPE_PROC_REF(TYPE, X) (nameof(##TYPE.proc/##X))
/**
* Call by name proc reference, checks if the proc is existing global proc
*
* * X - The proc name
*/
#define GLOBAL_PROC_REF(X) (/proc/##X)
#endif