diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 669676b3ded..d85e3c5334b 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -142,12 +142,12 @@ datum/controller/game_controller/proc/buildcamlist() if(!istype(cameranet) || !istype(cameranet.cameras) || !cameranet.cameras.len) world.log << "cameranet has not been initialized before us, finding cameras manually." for(var/obj/machinery/camera/C in world) //can't use machines list because cameras are removed from it. - if(C.z == 1 || C.z == 5) + if(C.z == map.zMainStation || C.z == map.zAsteroid) var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"] ourlist += C else for(var/obj/machinery/camera/C in cameranet.cameras) //can't use machines list because cameras are removed from it. - if(C.z == 1 || C.z == 5) + if(C.z == map.zMainStation || C.z == map.zAsteroid) var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"] ourlist += C for(var/key in adv_camera.camerasbyzlevel) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 552ef09b939..d182f0b2cce 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -408,7 +408,7 @@ var/list/advance_cures = list( AD.Refresh() for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) - if(H.z != 1) + if(H.z != map.zMainStation) continue if(!H.has_disease(D)) H.contract_disease(D, 1) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index cd88ee39cab..4a6e9eb3c31 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -184,7 +184,7 @@ teleatom.visible_message("The [teleatom] bounces off of the portal!") return 0 - if(destination.z == 2) //centcomm z-level + if(destination.z == map.zCentcomm) //centcomm z-level if(istype(teleatom, /obj/mecha) && (universe.name != "Supermatter Cascade")) var/obj/mecha/MM = teleatom to_chat(MM.occupant, "The mech would not survive the jump to a location so far away!")//seriously though, why? who wrote that? diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 1764c7a0d4b..6d4acab19cb 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -75,7 +75,7 @@ proc/process_teleport_locs() if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue if(teleportlocs.Find(AR.name)) continue var/turf/picked = safepick(get_area_turfs(AR.type)) - if (picked && picked.z == 1) + if (picked && picked.z == map.zMainStation) teleportlocs += AR.name teleportlocs[AR.name] = AR @@ -90,7 +90,7 @@ proc/process_ghost_teleport_locs() ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR var/turf/picked = safepick(get_area_turfs(AR.type)) - if (picked && (picked.z == 1 || picked.z == 5 || picked.z == 3)) + if (picked && (picked.z == map.zMainStation || picked.z == map.zAsteroid || picked.z == map.zTCommSat)) ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 3cf2701eb00..ab1856c1fd0 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -100,7 +100,7 @@ You must kill it all while minimizing the damage to the station."}) if(directory[ckey(blob.key)]) blob_client = directory[ckey(blob.key)] location = get_turf(C) - if(location.z != 1 || istype(location, /turf/space)) + if(location.z != map.zMainStation || istype(location, /turf/space)) location = null qdel(C) diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 1a05797a727..3c20622cb15 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -30,7 +30,7 @@ Message ends."} var/nukecode = "ERROR" for(var/obj/machinery/nuclearbomb/bomb in machines) if(bomb && bomb.r_code) - if(bomb.z == 1) + if(bomb.z == map.zMainStation) nukecode = bomb.r_code interceptname = "Directive 7-12" intercepttext = {"Nanotrasen Update: Biohazard Alert.
@@ -72,7 +72,7 @@ Message ends."} proc/count() for(var/turf/T in turfs) - if(T.z != 1) + if(T.z != map.zMainStation) continue if(istype(T,/turf/simulated/floor)) @@ -94,7 +94,7 @@ Message ends."} src.r_wall += 1 for(var/obj/O in world) - if(O.z != 1) + if(O.z != map.zMainStation) continue if(istype(O, /obj/structure/window)) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 0852f1642af..9c382ab8512 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -38,7 +38,7 @@ for(var/obj/effect/rune/R in rune_list) if(R == src) continue - if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != 2) + if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != map.zCentcomm) index++ allrunesloc.len = index allrunesloc[index] = R.loc diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index e0bfcdbdcfb..4a0619e5028 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -57,7 +57,7 @@ var/list/turfs = new var/turf/picked for(var/turf/simulated/floor/T in world) - if(T.z == 1) + if(T.z == map.zMainStation) turfs += T for(var/turf/simulated/floor/T in turfs) if(prob(20)) @@ -151,7 +151,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) + if(T.z != map.zMainStation) continue for(var/datum/disease/D in H.viruses) foundAlready = 1 @@ -185,7 +185,7 @@ // world << sound('sound/AI/aliens.ogg') var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network && temp_vent.canSpawnMice) + if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network && temp_vent.canSpawnMice) if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent @@ -212,7 +212,7 @@ /* // Haha, this is way too laggy. I'll keep the prison break though. for(var/obj/machinery/light/L in world) - if(L.z != 1) continue + if(L.z != map.zMainStation) continue L.flicker(50) sleep(100) @@ -221,7 +221,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) + if(T.z != map.zMainStation) continue if(istype(H,/mob/living/carbon/human)) H.apply_effect((rand(15,75)),IRRADIATE,0) @@ -238,7 +238,7 @@ var/turf/T = get_turf(M) if(!T) continue - if(T.z != 1) + if(T.z != map.zMainStation) continue M.apply_effect((rand(15,75)),IRRADIATE,0) sleep(100) diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm index 47acd06deea..fe7d5978e28 100644 --- a/code/game/gamemodes/events/dust.dm +++ b/code/game/gamemodes/events/dust.dm @@ -83,7 +83,7 @@ The "dust" will damage the hull of the station causin minor hull breaches. var/goal = locate(endx, endy, 1) src.x = startx src.y = starty - src.z = 1 + src.z = map.zMainStation spawn(0) walk_towards(src, goal, 1) return diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm index 209672184bc..8f8fd3172f0 100644 --- a/code/game/gamemodes/events/holidays/Christmas.dm +++ b/code/game/gamemodes/events/holidays/Christmas.dm @@ -1,6 +1,6 @@ /proc/Christmas_Game_Start() for(var/obj/structure/flora/tree/pine/xmas in world) - if(xmas.z != 1) continue + if(xmas.z != map.zMainStation) continue for(var/turf/simulated/floor/T in orange(1,xmas)) for(var/i=1,i<=rand(1,5),i++) new /obj/item/weapon/winter_gift/regular(T) diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index c04b6c7f945..11c27d23232 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -216,7 +216,7 @@ var/global/Holiday = null var/list/obj/containers = list() for(var/obj/item/weapon/storage/S in world) - if(S.z != 1) continue + if(S.z != map.zMainStation) continue containers += S message_admins("DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])")*/ diff --git a/code/game/gamemodes/events/miniblob.dm b/code/game/gamemodes/events/miniblob.dm index 4961ce642b8..14ae2afed1a 100644 --- a/code/game/gamemodes/events/miniblob.dm +++ b/code/game/gamemodes/events/miniblob.dm @@ -22,7 +22,7 @@ sleep(-1) if(!blob_cores.len) break var/obj/effect/blob/B = pick(blob_cores) - if(B.z != 1) + if(B.z != map.zMainStation) continue B.Life() spawn(30) diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm index 15b02edb5f8..f7bdc73c251 100644 --- a/code/game/gamemodes/events/power_failure.dm +++ b/code/game/gamemodes/events/power_failure.dm @@ -4,7 +4,7 @@ if(announce) command_alert(/datum/command_alert/power_outage) for(var/obj/machinery/power/battery/smes/S in power_machines) - if(istype(get_area(S), /area/turret_protected) || S.z != 1) + if(istype(get_area(S), /area/turret_protected) || S.z != map.zMainStation) continue S.charge = 0 S.output = 0 @@ -25,7 +25,7 @@ break if(A.contents) for(var/atom/AT in A.contents) - if(AT.z != 1) //Only check one, it's enough. + if(AT.z != map.zMainStation) //Only check one, it's enough. skip = 1 break if(skip) continue @@ -34,7 +34,7 @@ A.power_environ = 0 for(var/obj/machinery/power/apc/C in power_machines) - if(C.cell && C.z == 1) + if(C.cell && C.z == map.zMainStation) var/area/A = get_area(C) var/skip = 0 for(var/area_type in skipped_areas) @@ -51,11 +51,11 @@ if(announce) command_alert(/datum/command_alert/power_restored) for(var/obj/machinery/power/apc/C in power_machines) - if(C.cell && C.z == 1) + if(C.cell && C.z == map.zMainStation) C.cell.charge = C.cell.maxcharge C.chargemode = 1 for(var/obj/machinery/power/battery/smes/S in power_machines) - if(S.z != 1) + if(S.z != map.zMainStation) continue S.charge = S.capacity S.output = 200000 @@ -73,7 +73,7 @@ if(announce) command_alert(/datum/command_alert/smes_charged) for(var/obj/machinery/power/battery/smes/S in power_machines) - if(S.z != 1) + if(S.z != map.zMainStation) continue S.charge = S.capacity S.output = 200000 diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm index 02c4cdb176b..cc37f200728 100644 --- a/code/game/gamemodes/events/wormholes.dm +++ b/code/game/gamemodes/events/wormholes.dm @@ -2,7 +2,7 @@ spawn() var/list/pick_turfs = list() for(var/turf/simulated/floor/T in turfs) - if(T.z == 1) + if(T.z == map.zMainStation) pick_turfs += T if(pick_turfs.len) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 1f61b4c6702..7cbd5ddc45a 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -322,7 +322,7 @@ var/global/datum/controller/gameticker/ticker for(var/mob/living/M in living_mob_list) if(M) var/turf/T = get_turf(M) - if(T && T.z == 1) + if(T && T.z == map.zMainStation) M.death()//No mercy //If its actually the end of the round, wait for it to end. //Otherwise if its a verb it will continue on afterwards. diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm index de99e8e3633..9de07591369 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -1372,7 +1372,7 @@ datum var/turf/T = get_turf(target.current) if(target.current.stat == 2) return 1 - else if((T) && (T.z != 1))//If they leave the station they count as dead for this + else if((T) && (T.z != map.zMainStation))//If they leave the station they count as dead for this return 2 else return 0 diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index ed5f9464252..63db673a8d6 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -285,7 +285,7 @@ var/bomb_set var/off_station = 0 var/turf/bomb_location = get_turf(src) - if( bomb_location && (bomb_location.z == 1) ) + if( bomb_location && (bomb_location.z == map.zMainStation) ) if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) ) off_station = 1 else diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 510c45043ad..9e8f8223d5b 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -90,7 +90,7 @@ var/list/potential_theft_objectives=list( if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey) return 1 var/turf/T = get_turf(target.current) - if(T && (T.z != 1)) //If they leave the station they count as dead for this + if(T && (T.z != map.zMainStation)) //If they leave the station they count as dead for this return 2 return 0 return 1 @@ -124,7 +124,7 @@ var/list/potential_theft_objectives=list( if(target in ticker.mode:head_revolutionaries) return 1 var/turf/T = get_turf(target.current) - if(T && (T.z != 1)) //If they leave the station they count as dead for this + if(T && (T.z != map.zMainStation)) //If they leave the station they count as dead for this rval = 2 return 0 return rval diff --git a/code/game/gamemodes/revolution/anti_revolution.dm b/code/game/gamemodes/revolution/anti_revolution.dm index b4ed5d7f136..99b8f194aae 100644 --- a/code/game/gamemodes/revolution/anti_revolution.dm +++ b/code/game/gamemodes/revolution/anti_revolution.dm @@ -134,7 +134,7 @@ /datum/game_mode/anti_revolution/proc/check_crew_victory() for(var/datum/mind/head_mind in heads) var/turf/T = get_turf(head_mind.current) - if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600)) + if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == map.zMainStation) && !head_mind.is_brigged(600)) if(ishuman(head_mind.current)) return 0 return 1 diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 0684b7a6a5f..48b81b56468 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -124,7 +124,7 @@ // probably wanna export this stuff into a separate function for use by both // revs and heads //assume that only carbon mobs can become rev heads for now - if(!rev_mind.current:handcuffed && T && T.z == 1) + if(!rev_mind.current:handcuffed && T && T.z == map.zMainStation) return 0 return 1 diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 66e17761c9d..dc734ab36b9 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -113,7 +113,7 @@ score["disc"] = 0 if(location in bad_zone3) score["disc"] = 0 - if(A.loc.z != 1) + if(A.loc.z != map.zMainStation) score["disc"] = 0 if(score["nuked"]) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 4f0348bdc00..388f9fcc0d8 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -57,7 +57,7 @@ var/turf/T = get_turf(M) if(!T) continue - if(T.z == 2) + if(T.z == map.zCentcomm) continue if(T.z > 6) continue diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 808be220bc6..c55ce8fa466 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -52,7 +52,7 @@ var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in if(!M) continue //Changeling monkeys break the console, bad monkeys. - if(M.z == 1 && !istype(M.loc, /turf/space)) + if(M.z == map.zMainStation && !istype(M.loc, /turf/space)) var/turf/mob_loc = get_turf(M) loc_display = mob_loc.loc if(T.malfunction) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 8613faad623..ce4a7e50230 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -376,7 +376,7 @@ Class Procs: return 1 var/turf/T = get_turf(usr) if(!isAI(usr) && T.z != z) - if(usr.z != 2) + if(usr.z != map.zCentcomm) to_chat(usr, "WARNING: Unable to interface with \the [src.name].") return 1 if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon)) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 90b6a7d8abc..8f2b759e768 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -155,7 +155,7 @@ continue var/turf/T = get_turf(M) if(T) continue - if(T.z == 2) continue + if(T.z == map.zCentcomm) continue var/tmpname = M.real_name if(areaindex[tmpname]) tmpname = "[tmpname] ([++areaindex[tmpname]])" diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 6e9ae62f08a..fe9adf29a6b 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -600,7 +600,7 @@ range = RANGED /obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target) - if(!action_checks(target) || src.loc.z == 2) return + if(!action_checks(target) || src.loc.z == map.zCentcomm) return var/turf/T = get_turf(target) if(T) set_ready_state(0) @@ -620,7 +620,7 @@ /obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target) - if(!action_checks(target) || src.loc.z == 2) return + if(!action_checks(target) || src.loc.z == map.zCentcomm) return var/list/theareas = list() for(var/area/AR in orange(100, chassis)) if(AR in theareas) continue diff --git a/code/game/objects/structures/vehicles/adminbus_powers.dm b/code/game/objects/structures/vehicles/adminbus_powers.dm index 9c0e0f77b13..c737a05ba1e 100644 --- a/code/game/objects/structures/vehicles/adminbus_powers.dm +++ b/code/game/objects/structures/vehicles/adminbus_powers.dm @@ -567,7 +567,7 @@ I.loc = M.loc I.reset_plane_and_layer() I.dropped(M) - I.z = 2 + I.z = map.zCentcomm I.y = 68 I.x = (thunderdomefightercount % 15) + 121 diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 503369391b7..a46f1a37aa3 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -168,7 +168,7 @@ var/locked_to_current_z = 0//To prevent the moveable atom from leaving this Z, examples are DAT DISK and derelict MoMMIs. for(var/obj/item/weapon/disk/nuclear in contents_brought) - locked_to_current_z = 1 + locked_to_current_z = map.zMainStation break //Check if it's a mob pulling an object @@ -186,7 +186,7 @@ for(var/mob/living/silicon/robot/mommi in contents_brought) if(mommi.locked_to_z != 0) if(src.z == mommi.locked_to_z) - locked_to_current_z = 1 + locked_to_current_z = map.zMainStation else to_chat(mommi, "You find your way back.") move_to_z = mommi.locked_to_z diff --git a/code/global.dm b/code/global.dm index 4cac5bb6031..8ac3e19853e 100644 --- a/code/global.dm +++ b/code/global.dm @@ -181,7 +181,7 @@ var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-ti var/list/WORLD_X_OFFSET = list() var/list/WORLD_Y_OFFSET = list() -var/shuttle_z = 2 //default +var/shuttle_z = map.zCentcomm //default var/airtunnel_start = 68 // default var/airtunnel_stop = 68 // default var/airtunnel_bottom = 72 // default @@ -423,4 +423,4 @@ var/adminblob_beat = 'sound/effects/blob_pulse.ogg' //SPACE PARALLAX var/parallax_initialized = 0 var/space_color = "#050505" -var/list/parallax_icon[27] \ No newline at end of file +var/list/parallax_icon[27] diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c0a1d01efe0..0419d4ebda2 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1128,7 +1128,7 @@ var/global/floorIsLava = 0 set category = "Admin" set name = "Unprison" - if (M.z == 2) + if (M.z == map.zCentcomm) if (config.allow_admin_jump) M.loc = pick(latejoin) message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1) @@ -1197,7 +1197,7 @@ var/global/floorIsLava = 0 if(3) var/count = 0 for(var/mob/living/carbon/monkey/Monkey in world) - if(Monkey.z == 1) + if(Monkey.z == map.zMainStation) count++ return "Kill all [count] of the monkeys on the station" if(4) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index c9f3b8702f7..9fbec483c55 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1779,7 +1779,7 @@ foo += text("Is an AI | ") else foo += text("Make AI | ", src, M) - if(M.z != 2) + if(M.z != map.zCentcomm) foo += text("Prison | ", src, M) foo += text("Maze | ", src, M) else @@ -2454,7 +2454,7 @@ feedback_add_details("admin_secrets_fun_used","DP") var/A = locate(/area/shuttle_prison) for(var/atom/movable/AM as mob|obj in A) - AM.z = 2 + AM.z = map.zCentcomm AM.Move() */ message_admins("[key_name_admin(usr)] sent the prison shuttle back.", 1) @@ -2777,7 +2777,7 @@ for(var/turf/simulated/floor/F in turfs) count++ if(!(count % 50000)) sleep(world.tick_lag) - if(F.z == 1) + if(F.z == map.zMainStation) F.name = "lava" F.desc = "The floor is LAVA!" F.overlays += image(icon = F.icon, icon_state = "lava") @@ -2803,7 +2803,7 @@ sleep(10) for(var/turf/simulated/floor/F in lavaturfs) // Reset everything. - if(F.z == 1) + if(F.z == map.zMainStation) F.name = initial(F.name) F.desc = initial(F.desc) F.overlays.len = 0 @@ -2882,7 +2882,7 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","EgL") for(var/obj/machinery/door/airlock/W in all_doors) - if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) + if(W.z == map.zMainStation && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) W.req_access = list() message_admins("[key_name_admin(usr)] activated Egalitarian Station mode") command_alert(/datum/command_alert/eagles) diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 2203f5ff81a..724b23667b2 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -22,7 +22,7 @@ /datum/event/alien_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network) if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index e6d8720b15e..42f6a3ee511 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -84,7 +84,7 @@ if(directory[ckey(blob.key)]) blob_client = directory[ckey(blob.key)] location = get_turf(C) - if(location.z != 1 || istype(location, /turf/space)) + if(location.z != map.zMainStation || istype(location, /turf/space)) location = null C.gib() diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index 2d1cbdcda25..baaf63cbd4b 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -14,7 +14,7 @@ /datum/event/brand_intelligence/start() for(var/obj/machinery/vending/V in machines) - if(V.z != 1) continue + if(V.z != map.zMainStation) continue vendingMachines.Add(V) if(!vendingMachines.len) diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index afa26a63f95..cb3db715c42 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -16,7 +16,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) + if(T.z != map.zMainStation) continue for(var/datum/disease/D in H.viruses) foundAlready = 1 diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 46195ff8c82..94b2df77923 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -301,21 +301,21 @@ spawn(0) to_chat(world, "Started processing APCs") for (var/obj/machinery/power/apc/APC in world) - if(APC.z == 1) + if(APC.z == map.zMainStation) APC.ion_act() apcnum++ to_chat(world, "Finished processing APCs. Processed: [apcnum]") spawn(0) to_chat(world, "Started processing SMES") for (var/obj/machinery/power/smes/SMES in world) - if(SMES.z == 1) + if(SMES.z == map.zMainStation) SMES.ion_act() smesnum++ to_chat(world, "Finished processing SMES. Processed: [smesnum]") spawn(0) to_chat(world, "Started processing AIRLOCKS") for (var/obj/machinery/door/airlock/D in world) - if(D.z == 1) + if(D.z == map.zMainStation) //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks airlocknum++ spawn(0) @@ -324,7 +324,7 @@ spawn(0) to_chat(world, "Started processing FIREDOORS") for (var/obj/machinery/door/firedoor/D in world) - if(D.z == 1) + if(D.z == map.zMainStation) firedoornum++; spawn(0) D.ion_act() diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm index cbd99095fbf..b735020db17 100644 --- a/code/modules/events/money_hacker.dm +++ b/code/modules/events/money_hacker.dm @@ -10,7 +10,7 @@ /datum/event/money_hacker/setup() if(all_money_accounts.len) for(var/obj/machinery/account_database/DB in account_DBs) - if( DB.z == 1 && !(DB.stat&NOPOWER) && DB.activated ) + if( DB.z == map.zMainStation && !(DB.stat&NOPOWER) && DB.activated ) affected_db = DB break if(affected_db) diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 0affd9fa8ee..dff799b1050 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -27,7 +27,7 @@ command_alert(/datum/command_alert/radiation_storm) for(var/area/A in areas) - if(A.z != 1 || is_safe_zone(A)) + if(A.z != map.zMainStation || is_safe_zone(A)) continue var/area/ma = get_area_master(A) ma.radiation_alert() @@ -50,7 +50,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1 || is_safe_zone(T.loc)) + if(T.z != map.zMainStation || is_safe_zone(T.loc)) continue var/applied_rads = (H.apply_effect(irradiationThisBurst,IRRADIATE,0) > (irradiationThisBurst/4)) @@ -69,7 +69,7 @@ command_alert(/datum/command_alert/radiation_storm/end) for(var/area/A in areas) - if(A.z != 1 || is_safe_zone(A)) + if(A.z != map.zMainStation || is_safe_zone(A)) continue var/area/ma = get_area_master(A) ma.reset_radiation_alert() diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index 02c04e5bebe..d441968572a 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -37,7 +37,7 @@ var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() sparks.set_up(3, 0, locc) sparks.start() - D.z = 2 + D.z = map.zCentcomm D.has_loot = 0 qdel(D) // Drone deletion handles removal from drones list diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 84ff29722a6..b49cc9e2ba8 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -18,7 +18,7 @@ /datum/event/spider_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/modules/html_interface/map/adv_sec/adv_camera.dm b/code/modules/html_interface/map/adv_sec/adv_camera.dm index 96aa9c94c03..c51c5c1aa6a 100644 --- a/code/modules/html_interface/map/adv_sec/adv_camera.dm +++ b/code/modules/html_interface/map/adv_sec/adv_camera.dm @@ -128,7 +128,7 @@ var/global/datum/interactive_map/camera/adv_camera = new continue if(pos.z != zz) camerasbyzlevel["[zz]"] -= C //bad zlevel - if(pos.z == 1 || pos.z == 5) + if(pos.z == map.zMainStation || pos.z == map.zAsteroid) camerasbyzlevel["[zz]"] |= C //try to fix the zlevel list. continue ID="\ref[C]" @@ -149,7 +149,7 @@ var/global/datum/interactive_map/camera/adv_camera = new var/turf/pos = get_turf(single) if(pos.z != zz) camerasbyzlevel["[zz]"] -= single //bad zlevel - if(pos.z == 1 || pos.z == 5) + if(pos.z == map.zMainStation || pos.z == map.zAsteroid) camerasbyzlevel["[zz]"] |= single //try to fix the zlevel list else adding = 2 //Set to remove ID="\ref[single]" diff --git a/code/modules/mining/ores.dm b/code/modules/mining/ores.dm index ccc30f46721..6284a11b820 100644 --- a/code/modules/mining/ores.dm +++ b/code/modules/mining/ores.dm @@ -268,7 +268,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) var/notify_admins = 0 - if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel + if(z != map.zAsteroid)//Only annoy the admins ingame if we're triggered off the mining zlevel notify_admins = 1 if(notify_admins) if(triggered_by_explosive) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 2a4b0dae5af..ad268c04242 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -268,7 +268,7 @@ var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) var/notify_admins = 0 - if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel + if(z != map.zAsteroid)//Only annoy the admins ingame if we're triggered off the mining zlevel notify_admins = 1 if(notify_admins) if(triggered_by_explosive) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4afc36efea8..e0122de9baa 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -993,7 +993,7 @@ return 0 if((temp_turf.z != our_turf.z) || M.stat!=CONSCIOUS) //Not on the same zlevel as us or they're dead. // to_chat(world, "[(temp_turf.z != our_turf.z) ? "not on the same zlevel as [M]" : "[M] is not concious"]") - if(temp_turf.z != 2) + if(temp_turf.z != map.zCentcomm) to_chat(src, "The mind of [M] is too faint...")//Prevent "The mind of Admin is too faint..." diff --git a/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm b/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm index 9e8b6627fd5..873213ff5d3 100644 --- a/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm +++ b/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm @@ -296,7 +296,7 @@ //Not on the station or mining? var/turf/temp_turf = get_turf(remoteview_target) - if(temp_turf && (temp_turf.z != 1 && temp_turf.z != 5) || remoteview_target.stat!=CONSCIOUS) + if(temp_turf && (temp_turf.z != map.zMainStation && temp_turf.z != map.zAsteroid) || remoteview_target.stat!=CONSCIOUS) to_chat(src, "Your psy-connection grows too faint to maintain!") isRemoteObserve = 0 if(!isRemoteObserve && client && !client.adminobs && !isTeleViewing(client.eye)) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index 3b63c8d4228..4addbc73999 100644 --- a/code/modules/mob/living/silicon/ai/death.dm +++ b/code/modules/mob/living/silicon/ai/death.dm @@ -15,21 +15,21 @@ var/callshuttle = 0 for(var/obj/machinery/computer/communications/commconsole in machines) - if(commconsole.z == 2) + if(commconsole.z == map.zCentcomm) continue if(istype(commconsole.loc,/turf)) break callshuttle++ for(var/obj/item/weapon/circuitboard/communications/commboard in world) - if(commboard.z == 2) + if(commboard.z == map.zCentcomm) continue if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) break callshuttle++ for(var/mob/living/silicon/ai/shuttlecaller in player_list) - if(shuttlecaller.z == 2) + if(shuttlecaller.z == map.zCentcomm) continue if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) break diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 848c41a10af..ab839f3a501 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -508,10 +508,11 @@ nanoui is used to open and update nano browser uis map_update = 1 if(href_list["zlevel"]) - var/newz = input("Choose Z-Level to view.","Z-Levels",1) as null|anything in list(1,3,4,5,6) + var/listed_zlevels = list(map.zMainStation, map.zTCommSat, map.zDerelict, map.zAsteroid, map.zDeepSpace) + var/newz = input("Choose Z-Level to view.","Z-Levels",1) as null|anything in listed_zlevels if(!newz || isnull(newz)) return 0 - if(newz < 1 || newz > 6 || newz == 2) + if(!(newz in listed_zlevels)) to_chat(usr, "Unable to establish a connection") return 0 if(newz != map_z_level) @@ -546,4 +547,3 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/update(var/force_open = 0) src_object.ui_interact(user, ui_key, src, force_open) - diff --git a/code/modules/power/battery.dm b/code/modules/power/battery.dm index 5c8d7200917..1bc7ca600fb 100644 --- a/code/modules/power/battery.dm +++ b/code/modules/power/battery.dm @@ -259,7 +259,7 @@ var/global/list/battery_online = list( return 1 /obj/machinery/power/battery/proc/ion_act() - if(src.z == 1) + if(src.z == map.zMainStation) if(prob(1)) //explosion message_admins("SMES explosion in [get_area(src)]") src.visible_message("\The [src] is making strange noises!",