mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Linter Introduction + Cleanup
This commit is contained in:
31
code/__defines/spaceman_dmm.dm
Normal file
31
code/__defines/spaceman_dmm.dm
Normal file
@@ -0,0 +1,31 @@
|
||||
// Interfaces for the SpacemanDMM linter, define'd to nothing when the linter
|
||||
// is not in use.
|
||||
|
||||
// The SPACEMAN_DMM define is set by the linter and other tooling when it runs.
|
||||
#ifdef SPACEMAN_DMM
|
||||
#define RETURN_TYPE(X) set SpacemanDMM_return_type = X
|
||||
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
|
||||
#define UNLINT(X) SpacemanDMM_unlint(X)
|
||||
#define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X
|
||||
#define SHOULD_NOT_SLEEP(X) set SpacemanDMM_should_not_sleep = X
|
||||
#define SHOULD_BE_PURE(X) set SpacemanDMM_should_be_pure = X
|
||||
#define PRIVATE_PROC(X) set SpacemanDMM_private_proc = X
|
||||
#define PROTECTED_PROC(X) set SpacemanDMM_protected_proc = X
|
||||
#define CAN_BE_REDEFINED(X) set SpacemanDMM_can_be_redefined = X
|
||||
#define VAR_FINAL var/SpacemanDMM_final
|
||||
#define VAR_PRIVATE var/SpacemanDMM_private
|
||||
#define VAR_PROTECTED var/SpacemanDMM_protected
|
||||
#else
|
||||
#define RETURN_TYPE(X)
|
||||
#define SHOULD_CALL_PARENT(X)
|
||||
#define UNLINT(X) X
|
||||
#define SHOULD_NOT_OVERRIDE(X)
|
||||
#define SHOULD_NOT_SLEEP(X)
|
||||
#define SHOULD_BE_PURE(X)
|
||||
#define PRIVATE_PROC(X)
|
||||
#define PROTECTED_PROC(X)
|
||||
#define CAN_BE_REDEFINED(X)
|
||||
#define VAR_FINAL var
|
||||
#define VAR_PRIVATE var
|
||||
#define VAR_PROTECTED var
|
||||
#endif
|
||||
@@ -112,7 +112,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
// Macro defining the actual code applying our overlays lists to the BYOND overlays list. (I guess a macro for speed)
|
||||
// TODO - I don't really like the location of this macro define. Consider it. ~Leshana
|
||||
#define COMPILE_OVERLAYS(A)\
|
||||
if (TRUE) {\
|
||||
do {\
|
||||
var/list/oo = A.our_overlays;\
|
||||
var/list/po = A.priority_overlays;\
|
||||
if(LAZYLEN(po)){\
|
||||
@@ -130,4 +130,4 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
A.overlays.Cut();\
|
||||
}\
|
||||
A.flags &= ~OVERLAY_QUEUED;\
|
||||
}
|
||||
} while (FALSE)
|
||||
|
||||
Reference in New Issue
Block a user