mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Document the world (#46495) * Document drone verbs.dm * Document the outfit datum with autodoc (#45415) * Uncurse take_damage and document obj_defense.dm (#45146) The original take_damage proc defined vars for no good reason had some duplicate code and wasn't very readable. If you are wondering why it calls obj_break every time it takes damage while below integrity_failure, that's the way it used to be. Most (if not all) stuff that takes advantage of this functionality already accounts for this. * Convert some code docs into the auto doc format (#45101) * Commit Message * Fixes * e * Documents browserOutput.dm (#51439) * Add autodoc to the callback datum (#45463) * Autodoc the vending machine (#45468) * Autodoc the vending machine * Update code/modules/vending/_vending.dm Co-Authored-By: Tad Hardesty <tad@platymuus.com> * autodoc organ helpers (#45464) * timer proc autodocs (#46530) * bunch of define autodocs * ballistic guns autodoc (#45578) * ballistic guns autodoc * fixes * client vars autodoc (#46446) About The Pull Request Autodocs client vars * Autodoc for XB and Research * shuttle docking autodoc (#48677) * Add autodocs for reagents (#49478) * Fix Co-authored-by: oranges <email@oranges.net.nz> Co-authored-by: Jonathan (JJRcop) Rubenstein <jrubcop@gmail.com> Co-authored-by: nemvar <47324920+nemvar@users.noreply.github.com> Co-authored-by: alexkar598 <> Co-authored-by: Tad Hardesty <tad@platymuus.com> Co-authored-by: spookydonut <github@spooksoftware.com> Co-authored-by: actioninja <actioninja@gmail.com>
60 lines
2.3 KiB
Plaintext
60 lines
2.3 KiB
Plaintext
//See also controllers/globals.dm
|
|
|
|
/// Creates a global initializer with a given InitValue expression, do not use
|
|
#define GLOBAL_MANAGED(X, InitValue)\
|
|
/datum/controller/global_vars/proc/InitGlobal##X(){\
|
|
##X = ##InitValue;\
|
|
gvars_datum_init_order += #X;\
|
|
}
|
|
/// Creates an empty global initializer, do not use
|
|
#define GLOBAL_UNMANAGED(X) /datum/controller/global_vars/proc/InitGlobal##X() { return; }
|
|
|
|
/// Prevents a given global from being VV'd
|
|
#ifndef TESTING
|
|
#define GLOBAL_PROTECT(X)\
|
|
/datum/controller/global_vars/InitGlobal##X(){\
|
|
..();\
|
|
gvars_datum_protected_varlist[#X] = TRUE;\
|
|
}
|
|
#else
|
|
#define GLOBAL_PROTECT(X)
|
|
#endif
|
|
|
|
/// Standard BYOND global, do not use
|
|
#define GLOBAL_REAL_VAR(X) var/global/##X
|
|
|
|
/// Standard typed BYOND global, do not use
|
|
#define GLOBAL_REAL(X, Typepath) var/global##Typepath/##X
|
|
|
|
/// Defines a global var on the controller, do not use
|
|
#define GLOBAL_RAW(X) /datum/controller/global_vars/var/global##X
|
|
|
|
/// Create an untyped global with an initializer expression
|
|
#define GLOBAL_VAR_INIT(X, InitValue) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, InitValue)
|
|
|
|
/// Create a global const var, do not use
|
|
#define GLOBAL_VAR_CONST(X, InitValue) GLOBAL_RAW(/const/##X) = InitValue; GLOBAL_UNMANAGED(X)
|
|
|
|
/// Create a list global with an initializer expression
|
|
#define GLOBAL_LIST_INIT(X, InitValue) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, InitValue)
|
|
|
|
/// Create a list global that is initialized as an empty list
|
|
#define GLOBAL_LIST_EMPTY(X) GLOBAL_LIST_INIT(X, list())
|
|
|
|
/// Create a typed list global with an initializer expression
|
|
#define GLOBAL_LIST_INIT_TYPED(X, Typepath, InitValue) GLOBAL_RAW(/list##Typepath/X); GLOBAL_MANAGED(X, InitValue)
|
|
|
|
/// Create a typed list global that is initialized as an empty list
|
|
#define GLOBAL_LIST_EMPTY_TYPED(X, Typepath) GLOBAL_LIST_INIT_TYPED(X, Typepath, list())
|
|
|
|
/// Create a typed global with an initializer expression
|
|
#define GLOBAL_DATUM_INIT(X, Typepath, InitValue) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, InitValue)
|
|
|
|
/// Create an untyped null global
|
|
#define GLOBAL_VAR(X) GLOBAL_RAW(/##X); GLOBAL_UNMANAGED(X)
|
|
|
|
/// Create a null global list
|
|
#define GLOBAL_LIST(X) GLOBAL_RAW(/list/##X); GLOBAL_UNMANAGED(X)
|
|
|
|
/// Create an typed null global
|
|
#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_UNMANAGED(X) |