mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 23:52:12 +00:00
Runtime Map Loading (#3597)
changes: Maps are no longer compiled in, instead loaded directly from the DMMs at runtime. Z level defines have been moved from the config to map datums. Unit tests now use typecaches. DMMS now actually works. DMMS has been updated slightly. DMMS is now capable of loading simple lists of non-text types. DMMS is now faster when loading many types without mapped in attributes and when loading area instances. Asteroid generation is now defined on the map datum instead of being hard-coded in SSasteroid. Holodeck presets are now defined on the map datum. Atmos machinery now uses Initialize().
This commit is contained in:
@@ -4,12 +4,19 @@ var/z_levels = 0 // Each bit represents a connection between adjacent levels. S
|
||||
|
||||
// If the height is more than 1, we mark all contained levels as connected.
|
||||
/obj/effect/landmark/map_data/New()
|
||||
SSatlas.height_markers += src
|
||||
|
||||
/obj/effect/landmark/map_data/proc/setup()
|
||||
ASSERT(height <= z)
|
||||
// Due to the offsets of how connections are stored v.s. how z-levels are indexed, some magic number silliness happened.
|
||||
for(var/i = (z - height) to (z - 2))
|
||||
z_levels |= (1 << i)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/map_data/Destroy()
|
||||
SSatlas.height_markers -= src
|
||||
return ..()
|
||||
|
||||
// The storage of connections between adjacent levels means some bitwise magic is needed.
|
||||
/proc/HasAbove(var/z)
|
||||
if(z >= world.maxz || z > 16 || z < 1)
|
||||
@@ -50,4 +57,4 @@ proc/AreConnectedZLevels(var/zA, var/zB)
|
||||
else if (dir == DOWN)
|
||||
. = GetBelow(ref)
|
||||
else
|
||||
. = get_step(ref, dir)
|
||||
. = get_step(ref, dir)
|
||||
|
||||
Reference in New Issue
Block a user