mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 06:28:01 +01:00
More globals (#19247)
* More globals * planets * . * . * Update jukebox.dm * Fix timer callback syntax in jukebox.dm * .
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
// If you add a more comprehensive system, just untick this file.
|
||||
var/list/z_levels = list()// Each bit re... haha just kidding this is a list of bools now
|
||||
GLOBAL_LIST_EMPTY(z_levels)// Each bit re... haha just kidding this is a list of bools now
|
||||
|
||||
// If the height is more than 1, we mark all contained levels as connected.
|
||||
INITIALIZE_IMMEDIATE(/obj/effect/landmark/map_data)
|
||||
/obj/effect/landmark/map_data/Initialize(mapload)
|
||||
for(var/i = (z - height + 1) to (z-1))
|
||||
if (z_levels.len <i)
|
||||
z_levels.len = i
|
||||
z_levels[i] = TRUE
|
||||
if (length(GLOB.z_levels) <i)
|
||||
GLOB.z_levels.len = i
|
||||
GLOB.z_levels[i] = TRUE
|
||||
..()
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
// The storage of connections between adjacent levels means some bitwise magic is needed.
|
||||
/proc/HasAbove(var/z)
|
||||
if(z >= world.maxz || z < 1 || z > z_levels.len)
|
||||
if(z >= world.maxz || z < 1 || z > length(GLOB.z_levels))
|
||||
return 0
|
||||
return z_levels[z]
|
||||
return GLOB.z_levels[z]
|
||||
|
||||
/proc/HasBelow(var/z)
|
||||
if(z > world.maxz || z < 2 || (z-1) > z_levels.len)
|
||||
if(z > world.maxz || z < 2 || (z-1) > length(GLOB.z_levels))
|
||||
return 0
|
||||
return z_levels[z-1]
|
||||
return GLOB.z_levels[z-1]
|
||||
|
||||
// Thankfully, no bitwise magic is needed here.
|
||||
/proc/GetAbove(var/atom/atom)
|
||||
|
||||
Reference in New Issue
Block a user