-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Massive replace PROC_REF and supporting 515 Byond --------- Co-authored-by: DeadLine <[email protected]>
- Loading branch information
1 parent
92cfcc9
commit 0a47c4a
Showing
1,266 changed files
with
3,888 additions
and
3,866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* NAMEOF: Compile time checked variable name to string conversion | ||
* evaluates to a string equal to "X", but compile errors if X isn't a var on datum. | ||
* datum may be null, but it does need to be a typed var. | ||
**/ | ||
#define NAMEOF(datum, X) (#X || ##datum.##X) | ||
|
||
/** | ||
* NAMEOF that actually works in static definitions because src::type requires src to be defined | ||
*/ | ||
#define NAMEOF_STATIC(datum, X) (nameof(type::##X)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// This file contains defines allowing targeting byond versions newer than the supported | ||
|
||
//Update this whenever you need to take advantage of more recent byond features | ||
#define MIN_COMPILER_VERSION 515 | ||
#define MIN_COMPILER_BUILD 1630 | ||
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM) | ||
//Don't forget to update this part | ||
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update. | ||
#error You need version 515.1630 or higher | ||
#endif | ||
|
||
// Keep savefile compatibilty at minimum supported level | ||
/savefile/byond_version = MIN_COMPILER_VERSION | ||
|
||
// So we want to have compile time guarantees these methods exist on local type | ||
// We use wrappers for this in case some part of the api ever changes, and to make their function more clear | ||
// For the record: GLOBAL_VERB_REF would be useless as verbs can't be global. | ||
|
||
/// Call by name proc references, checks if the proc exists on either this type or as a global proc. | ||
#define PROC_REF(X) (nameof(.proc/##X)) | ||
/// Call by name verb references, checks if the verb exists on either this type or as a global verb. | ||
#define VERB_REF(X) (nameof(.verb/##X)) | ||
|
||
/// Call by name proc reference, checks if the proc exists on either the given type or as a global proc | ||
#define TYPE_PROC_REF(TYPE, X) (nameof(##TYPE.proc/##X)) | ||
/// Call by name verb reference, checks if the verb exists on either the given type or as a global verb | ||
#define TYPE_VERB_REF(TYPE, X) (nameof(##TYPE.verb/##X)) | ||
|
||
/// Call by name proc reference, checks if the proc is an existing global proc | ||
#define GLOBAL_PROC_REF(X) (/proc/##X) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.