Makes all global variables handled by the GLOB controller (#13152)

* Handlers converted, now to fix 3532 compile errors

* 3532 compile fixes later, got runtimes on startup

* Well the server loads now atleast

* Take 2

* Oops
This commit is contained in:
AffectedArc07
2020-03-20 21:56:37 -06:00
committed by GitHub
parent c8dbd0190e
commit 210f8badf4
667 changed files with 4243 additions and 4240 deletions
+7 -7
View File
@@ -3,7 +3,7 @@
// Gravity Generator
//
var/list/gravity_generators = list() // We will keep track of this by adding new gravity generators to the list, and keying it with the z level.
GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding new gravity generators to the list, and keying it with the z level.
#define GRAV_POWER_IDLE 0
#define GRAV_POWER_UP 1
@@ -388,19 +388,19 @@ var/list/gravity_generators = list() // We will keep track of this by adding new
var/turf/T = get_turf(src)
if(!T)
return 0
if(gravity_generators["[T.z]"])
return length(gravity_generators["[T.z]"])
if(GLOB.gravity_generators["[T.z]"])
return length(GLOB.gravity_generators["[T.z]"])
return 0
/obj/machinery/gravity_generator/main/proc/update_list()
var/turf/T = get_turf(src.loc)
if(T)
if(!gravity_generators["[T.z]"])
gravity_generators["[T.z]"] = list()
if(!GLOB.gravity_generators["[T.z]"])
GLOB.gravity_generators["[T.z]"] = list()
if(on)
gravity_generators["[T.z]"] |= src
GLOB.gravity_generators["[T.z]"] |= src
else
gravity_generators["[T.z]"] -= src
GLOB.gravity_generators["[T.z]"] -= src
// Misc