proc/createRandomZlevel() if(awaydestinations.len) //crude, but it saves another var! return var/list/potentialRandomZlevels = list() world << "Searching for away missions..." var/list/Lines = file2list("_maps/map_files/RandomZLevels/fileList.txt") if(!Lines.len) return for (var/t in Lines) if (!t) continue t = trim(t) if (length(t) == 0) continue else if (copytext(t, 1, 2) == "#") continue var/pos = findtext(t, " ") var/name = null // var/value = null if (pos) name = lowertext(copytext(t, 1, pos)) // value = copytext(t, pos + 1) else name = lowertext(t) if (!name) continue potentialRandomZlevels.Add(t) if(potentialRandomZlevels.len) world << "Loading away mission..." var/map = pick(potentialRandomZlevels) var/file = file(map) if(isfile(file)) maploader.load_map(file) // Initialize air for the away mission's turfs if(air_master) air_master.setup_allturfs(block(locate(1, 1, world.maxz), locate(world.maxx, world.maxy, world.maxz))) create_lighting_overlays(world.maxz) world.log << "away mission loaded: [map]" for(var/obj/effect/landmark/L in landmarks_list) if (L.name != "awaystart") continue awaydestinations.Add(L) world << "Away mission loaded." else world << "No away missions found." return