Merge pull request #5496 from Citadel-Station-13/upstream-merge-35339

[MIRROR] Support stations with multiple z-levels
This commit is contained in:
deathride58
2018-02-17 21:24:48 +00:00
committed by GitHub
27 changed files with 278 additions and 196869 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