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:
Tad Hardesty
2018-02-15 01:21:25 -08:00
committed by CitadelStationBot
parent 95582c597b
commit 5b30b29a4b
23 changed files with 272 additions and 196863 deletions
+5 -4
View File
@@ -35,19 +35,20 @@
/obj/structure/ladder/LateInitialize()
// By default, discover ladders above and below us vertically
var/turf/T = get_turf(src)
var/obj/structure/ladder/L
if (!down)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z - 1))
L = locate() in SSmapping.get_turf_below(T)
if (L)
down = L
L.up = src // Don't waste effort looping the other way
L.update_icon()
break
if (!up)
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
L = locate() in SSmapping.get_turf_above(T)
if (L)
up = L
L.down = src // Don't waste effort looping the other way
L.update_icon()
break
update_icon()
+1 -18
View File
@@ -11,7 +11,7 @@
/turf/open/chasm/Initialize()
. = ..()
AddComponent(/datum/component/chasm, null)
AddComponent(/datum/component/chasm, SSmapping.get_turf_below(src))
/turf/open/chasm/proc/set_target(turf/target)
GET_COMPONENT(chasm_component, /datum/component/chasm)
@@ -64,16 +64,6 @@
/turf/open/chasm/CanPass(atom/movable/mover, turf/target)
return 1
// Naive "down" which just subtracts a z-level
/turf/open/chasm/straight_down
baseturfs = /turf/open/chasm/straight_down
/turf/open/chasm/straight_down/Initialize()
. = ..()
set_target(locate(x, y, z - 1))
// Chasms for Lavaland, with planetary atmos and lava glow
/turf/open/chasm/lavaland
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
@@ -95,10 +85,3 @@
underlay_appearance.icon = 'icons/turf/floors.dmi'
underlay_appearance.icon_state = "dirt"
return TRUE
/turf/open/chasm/jungle/straight_down
baseturfs = /turf/open/chasm/jungle/straight_down
/turf/open/chasm/jungle/straight_down/Initialize(mapload)
. = ..()
set_target(locate(x, y, z - 1))
@@ -3,7 +3,7 @@
desc = "Upon closer examination, it's still dirt."
icon = 'icons/turf/floors.dmi'
icon_state = "dirt"
baseturfs = /turf/open/chasm/jungle/straight_down
baseturfs = /turf/open/chasm/jungle
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
planetary_atmos = TRUE
attachment_holes = FALSE
+4 -6
View File
@@ -40,12 +40,10 @@
var/min = 1+TRANSITIONEDGE
var/list/possible_transtitons = list()
var/k = 1
var/list/config_list = SSmapping.config.transition_config
for(var/a in config_list)
if(config_list[a] == CROSSLINKED) // Only pick z-levels connected to station space
possible_transtitons += k
k++
for(var/A in SSmapping.z_list)
var/datum/space_level/D = A
if (D.linkage == CROSSLINKED)
possible_transtitons += D.z_value
var/_z = pick(possible_transtitons)
//now select coordinates for a border turf