Support stations with multiple z-levels (#35339)
* Remove ZLEVEL_STATION_PRIMARY * Add Up and Down traits for use by ladders and chasms * Give map_config creation its own proc * Combine LoadConfig and ValidateJSON and remove transition_config * Make space linkage a z-level trait * Remove ZLEVEL_EMPTY_SPACE * Update uses of GetFullMapPath * Handle multi-Z stations and load Lavaland and Reebe at runtime * Remove unused space maps * Fix inappropriate z-expansion in map reader, improve logging * Update comments relating to z-level configuration * Add Lavaland and Reebe to ALL_MAPS
This commit is contained in:
committed by
CitadelStationBot
parent
95582c597b
commit
5b30b29a4b
@@ -13,20 +13,20 @@
|
||||
|
||||
for (var/I in 1 to default_map_traits.len)
|
||||
var/list/features = default_map_traits[I]
|
||||
var/datum/space_level/S = new(I, features[DL_NAME], features[DL_LINKAGE], features[DL_TRAITS])
|
||||
var/datum/space_level/S = new(I, features[DL_NAME], features[DL_TRAITS])
|
||||
z_list += S
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/add_new_zlevel(name, linkage = SELFLOOPING, traits = list(), z_type = /datum/space_level)
|
||||
/datum/controller/subsystem/mapping/proc/add_new_zlevel(name, traits = list(), z_type = /datum/space_level)
|
||||
var/new_z = z_list.len + 1
|
||||
if (world.maxz < new_z)
|
||||
world.incrementMaxZ()
|
||||
CHECK_TICK
|
||||
// TODO: sleep here if the Z level needs to be cleared
|
||||
var/datum/space_level/S = new z_type(new_z, name, linkage, traits)
|
||||
var/datum/space_level/S = new z_type(new_z, name, traits)
|
||||
z_list += S
|
||||
return S
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/get_level(z)
|
||||
. = z_list[z]
|
||||
if (!.)
|
||||
CRASH("Unmanaged z-level: '[z]'")
|
||||
if (z_list && z >= 1 && z <= z_list.len)
|
||||
return z_list[z]
|
||||
CRASH("Unmanaged z-level [z]! maxz = [world.maxz], z_list.len = [z_list ? z_list.len : "null"]")
|
||||
|
||||
Reference in New Issue
Block a user