diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 742073efca979..c95967078eac5 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -364,7 +364,7 @@ Used by the AI doomsday and the self-destruct nuke. loaded_lazy_templates = SSmapping.loaded_lazy_templates #define INIT_ANNOUNCE(X) to_chat(world, span_boldannounce("[X]")); log_world(X) -/datum/controller/subsystem/mapping/proc/LoadGroup(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE) +/datum/controller/subsystem/mapping/proc/LoadGroup(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE, height_autosetup = TRUE) . = list() var/start_time = REALTIMEOFDAY @@ -394,7 +394,7 @@ Used by the AI doomsday and the self-destruct nuke. while (total_z > traits.len) // fall back to defaults on extra levels traits += list(default_traits.Copy()) - if(total_z > 1) // it's a multi z map + if(total_z > 1 && height_autosetup) // it's a multi z map, and we haven't opted out of trait autosetup for(var/z in 1 to total_z) if(z == 1) // bottom z-level traits[z]["Up"] = TRUE @@ -433,7 +433,7 @@ Used by the AI doomsday and the self-destruct nuke. // load the station station_start = world.maxz + 1 INIT_ANNOUNCE("Loading [current_map.map_name]...") - LoadGroup(FailedZs, "Station", current_map.map_path, current_map.map_file, current_map.traits, ZTRAITS_STATION) + LoadGroup(FailedZs, "Station", current_map.map_path, current_map.map_file, current_map.traits, ZTRAITS_STATION, height_autosetup = current_map.height_autosetup) if(SSdbcore.Connect()) var/datum/db_query/query_round_map_name = SSdbcore.NewQuery({" diff --git a/code/datums/map_config.dm b/code/datums/map_config.dm index 4c071cbc2bb31..0d7fb3d46d069 100644 --- a/code/datums/map_config.dm +++ b/code/datums/map_config.dm @@ -40,6 +40,8 @@ var/job_changes = list() /// List of additional areas that count as a part of the library var/library_areas = list() + /// Boolean - if TRUE, the "Up" and "Down" traits are automatically distributed to the map's z-levels. If FALSE; they're set via JSON. + var/height_autosetup = TRUE /// List of unit tests that are skipped when running this map var/list/skipped_tests @@ -208,6 +210,9 @@ continue library_areas += path + if ("height_autosetup" in json) + height_autosetup = json["height_autosetup"] + #ifdef UNIT_TESTS // Check for unit tests to skip, no reason to check these if we're not running tests for(var/path_as_text in json["ignored_unit_tests"])