mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Nukes 514 support (#26224)
* Nukes 514 support * 1633 * replace CI exclude for proc refs * 1619
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
/// Validates the proc exists on this type (or global unfortunately)
|
||||
#define PROC_REF(X) (nameof(.proc/##X))
|
||||
#define TYPE_PROC_REF(TYPE, X) (nameof(##TYPE.proc/##X))
|
||||
#define GLOBAL_PROC_REF(X) (/proc/##X)
|
||||
#define NAMEOF_STATIC(datum, X) (#X || type::##X)
|
||||
#define CALL_EXT call_ext
|
||||
@@ -0,0 +1,2 @@
|
||||
/// Use this for every proc passed in as second argument in regex.Replace. regex.Replace does not allow calling procs by name but as of 515 using proc refs will always call the top level proc instead of overrides
|
||||
#define REGEX_REPLACE_HANDLER SHOULD_NOT_OVERRIDE(TRUE)
|
||||
@@ -1,20 +1 @@
|
||||
// This file contains defines allowing targeting byond versions newer than the supported
|
||||
//TODO: REMOVE THE 514 STUFF WHEN DREAMCHECKER AND DM LANG SERVER GET THEIR ACT TOGETHER
|
||||
// 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
|
||||
#define PROC_REF(X) (.proc/##X)
|
||||
#define TYPE_PROC_REF(TYPE, X) (##TYPE.proc/##X)
|
||||
#define GLOBAL_PROC_REF(X) (.proc/##X)
|
||||
#define NAMEOF_STATIC(datum, X) (#X || ##datum.##X)
|
||||
#define CALL_EXT call
|
||||
#else
|
||||
/// Validates the proc exists on this type (or global unfortunately)
|
||||
#define PROC_REF(X) (nameof(.proc/##X))
|
||||
#define TYPE_PROC_REF(TYPE, X) (nameof(##TYPE.proc/##X))
|
||||
#define GLOBAL_PROC_REF(X) (/proc/##X)
|
||||
#define NAMEOF_STATIC(datum, X) (#X || type::##X)
|
||||
#define CALL_EXT call_ext
|
||||
#endif
|
||||
|
||||
/// Use this for every proc passed in as second argument in regex.Replace. regex.Replace does not allow calling procs by name but as of 515 using proc refs will always call the top level proc instead of overrides
|
||||
#define REGEX_REPLACE_HANDLER SHOULD_NOT_OVERRIDE(TRUE)
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE))))
|
||||
|
||||
//Update this whenever you need to take advantage of more recent byond features
|
||||
#define MIN_COMPILER_VERSION 514
|
||||
#define MIN_COMPILER_BUILD 1554
|
||||
#define MIN_COMPILER_VERSION 515
|
||||
#define MIN_COMPILER_BUILD 1619
|
||||
#if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD
|
||||
//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 514.1554 or higher
|
||||
#error You need version 515.1619 or higher
|
||||
#endif
|
||||
|
||||
@@ -101,10 +101,12 @@
|
||||
#include "code\__DEFINES\power_defines.dm"
|
||||
#include "code\__DEFINES\preferences_defines.dm"
|
||||
#include "code\__DEFINES\procpath.dm"
|
||||
#include "code\__DEFINES\proc_refs.dm"
|
||||
#include "code\__DEFINES\qdel_defines.dm"
|
||||
#include "code\__DEFINES\radiation_defines.dm"
|
||||
#include "code\__DEFINES\radio_defines.dm"
|
||||
#include "code\__DEFINES\reagents_defines.dm"
|
||||
#include "code\__DEFINES\regex.dm"
|
||||
#include "code\__DEFINES\revolution_defines.dm"
|
||||
#include "code\__DEFINES\role_preferences.dm"
|
||||
#include "code\__DEFINES\rolebans.dm"
|
||||
|
||||
@@ -18,7 +18,7 @@ def print_error(message: str, filename: str, line_number: int):
|
||||
else:
|
||||
print(f"{filename}:{line_number}: {RED}{message}{NC}")
|
||||
|
||||
IGNORE_515_PROC_MARKER_FILENAME = "__byond_version_compat.dm"
|
||||
IGNORE_515_PROC_MARKER_FILENAME = "proc_refs.dm"
|
||||
CHECK_515_PROC_MARKER_RE = re.compile(r"\.proc/")
|
||||
def check_515_proc_syntax(idx, line):
|
||||
if CHECK_515_PROC_MARKER_RE.search(line):
|
||||
|
||||
Reference in New Issue
Block a user