diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 815bad98052..d15d393517e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1002,7 +1002,7 @@ About the new airlock wires panel: if(operating || welded || locked) return if(!forced) - //despite the name, this wire is for general door control. + //despite the name, this wire is for general door control. //Bolts are already covered by the check for locked, above if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) ) return @@ -1076,7 +1076,7 @@ About the new airlock wires panel: emitter_resistance *= 3 //if assembly is given, create the new door from the assembly - if (assembly) + if (assembly && istype(assembly)) assembly_type = assembly.type electronics = assembly.electronics diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index d76d9d676b3..b0ba29dcd03 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -1,54 +1,55 @@ -proc/createRandomZlevel() - if(awaydestinations.len) //crude, but it saves another var! - return - - var/list/potentialRandomZlevels = list() - world << "\red \b Searching for away missions..." - var/list/Lines = file2list("maps/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) - // No, don't do lowertext here, that breaks paths on linux - name = copytext(t, 1, pos) - // value = copytext(t, pos + 1) - else - // No, don't do lowertext here, that breaks paths on linux - name = t - - if (!name) - continue - - potentialRandomZlevels.Add(name) - - - if(potentialRandomZlevels.len) - world << "\red \b Loading away mission..." - - var/map = pick(potentialRandomZlevels) - var/file = file(map) - if(isfile(file)) - maploader.load_map(file, load_speed = 100) - - for(var/obj/effect/landmark/L in landmarks_list) - if (L.name != "awaystart") - continue - awaydestinations.Add(L) - - world << "\red \b Away mission loaded." - - else - world << "\red \b No away missions found." - return \ No newline at end of file +proc/createRandomZlevel() + if(awaydestinations.len) //crude, but it saves another var! + return + + var/list/potentialRandomZlevels = list() + world << "\red \b Searching for away missions..." + var/list/Lines = file2list("maps/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) + // No, don't do lowertext here, that breaks paths on linux + name = copytext(t, 1, pos) + // value = copytext(t, pos + 1) + else + // No, don't do lowertext here, that breaks paths on linux + name = t + + if (!name) + continue + + potentialRandomZlevels.Add(name) + + + if(potentialRandomZlevels.len) + world << "\red \b Loading away mission..." + + var/map = pick(potentialRandomZlevels) + var/file = file(map) + if(isfile(file)) + maploader.load_map(file) + world.log << "away mission loaded: [map]" + + for(var/obj/effect/landmark/L in landmarks_list) + if (L.name != "awaystart") + continue + awaydestinations.Add(L) + + world << "\red \b Away mission loaded." + + else + world << "\red \b No away missions found." + return diff --git a/code/modules/maps/dmm_suite.dm b/code/modules/maps/dmm_suite.dm index 87de0e758e5..c263072f999 100644 --- a/code/modules/maps/dmm_suite.dm +++ b/code/modules/maps/dmm_suite.dm @@ -53,10 +53,9 @@ dmm_suite{ */ - verb/load_map(var/dmm_file as file, var/z_offset as num, var/load_speed as num) + verb/load_map(var/dmm_file as file, var/z_offset as num) // dmm_file: A .dmm file to load (Required). // z_offset: A number representing the z-level on which to start loading the map (Optional). - // load_speed: How many tiles should be loaded per second, defaults to no pause (Optional) verb/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){ // t1: A turf representing one corner of a three dimensional grid (Required).