Makes the station Z level into a list instead of a single define

This commit is contained in:
KorPhaeron
2017-09-11 12:39:52 -05:00
committed by CitadelStationBot
parent 8ee6fdb76a
commit d05fdb0eb0
86 changed files with 1322 additions and 110 deletions
@@ -20,11 +20,11 @@
if(!istype(mother, /datum/mapGenerator/repair/reload_station_map))
return
var/datum/mapGenerator/repair/reload_station_map/mother1 = mother
if(mother1.z != ZLEVEL_STATION)
if(!(mother1.z in GLOB.station_z_levels))
return //This is only for reloading station blocks!
GLOB.reloading_map = TRUE
var/static/dmm_suite/reloader = new
var/list/bounds = reloader.load_map(file(SSmapping.config.GetFullMapPath()),measureOnly = FALSE, no_changeturf = FALSE,x_offset = 0, y_offset = 0, z_offset = ZLEVEL_STATION, cropMap=TRUE, lower_crop_x = mother1.x_low, lower_crop_y = mother1.y_low, upper_crop_x = mother1.x_high, upper_crop_y = mother1.y_high)
var/list/bounds = reloader.load_map(file(SSmapping.config.GetFullMapPath()),measureOnly = FALSE, no_changeturf = FALSE,x_offset = 0, y_offset = 0, z_offset = ZLEVEL_STATION_PRIMARY, cropMap=TRUE, lower_crop_x = mother1.x_low, lower_crop_y = mother1.y_low, upper_crop_x = mother1.x_high, upper_crop_y = mother1.y_high)
var/list/obj/machinery/atmospherics/atmos_machines = list()
var/list/obj/structure/cable/cables = list()
@@ -87,13 +87,13 @@
/datum/mapGenerator/repair/reload_station_map/defineRegion(turf/start, turf/end)
. = ..()
if(start.z != ZLEVEL_STATION || end.z != ZLEVEL_STATION)
if(!(start.z in GLOB.station_z_levels) || !(end.z in GLOB.station_z_levels))
return
x_low = min(start.x, end.x)
y_low = min(start.y, end.y)
x_high = max(start.x, end.x)
y_high = max(start.y, end.y)
z = ZLEVEL_STATION
z = ZLEVEL_STATION_PRIMARY
GLOBAL_VAR_INIT(reloading_map, FALSE)