mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
## About The Pull Request This bumps the minimum compile version to 515.1642, due to [this BYOND bug](https://www.byond.com/forum/post/2936624) where byondapi can corrupt vars, and dreamluau is called regardless of whether a Lua script is actually being ran (mostly via `DREAMLUAU_CLEAR_REF_USERDATA`), so it's best to get rid of any potential of this bug triggering. ## Why It's Good For The Game mrrrp mrrrp mrrrowww ## Changelog No user-facing changes
38 lines
2.1 KiB
Plaintext
38 lines
2.1 KiB
Plaintext
// 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 1642
|
|
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM) && !defined(OPENDREAM)
|
|
//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.1642 or higher
|
|
#endif
|
|
|
|
// Unable to compile this version thanks to mutable appearance changes
|
|
#if (DM_VERSION == 515 && DM_BUILD == 1643)
|
|
#error This specific version of BYOND (515.1643) cannot compile this project.
|
|
#error If 515.1643 IS NOT the latest version of BYOND, then you should simply update as normal.
|
|
#error But if 515.1643 IS the latest version of BYOND, i.e. you can't update, then you MUST visit www.byond.com/download/build and downgrade to 515.1642.
|
|
#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 () (AND ONLY 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)
|