diff --git a/code/__DEFINES/maps.dm b/code/__DEFINES/maps.dm
index 084cc7d1ab7691..5e7ee3a4689e46 100644
--- a/code/__DEFINES/maps.dm
+++ b/code/__DEFINES/maps.dm
@@ -35,7 +35,7 @@ Last space-z level = empty
//zlevel defines, can be overridden for different maps in the appropriate _maps file.
#define ZLEVEL_CENTCOM 1
-#define ZLEVEL_STATION 2
+#define ZLEVEL_STATION_PRIMARY 2
#define ZLEVEL_MINING 5
#define ZLEVEL_LAVALAND 5
#define ZLEVEL_EMPTY_SPACE 12
diff --git a/code/__HELPERS/priority_announce.dm b/code/__HELPERS/priority_announce.dm
index d3b9580f372459..0ffd8d85801b07 100644
--- a/code/__HELPERS/priority_announce.dm
+++ b/code/__HELPERS/priority_announce.dm
@@ -39,7 +39,7 @@
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/ai/commandreport.ogg')
for(var/obj/machinery/computer/communications/C in GLOB.machines)
- if(!(C.stat & (BROKEN|NOPOWER)) && C.z == ZLEVEL_STATION)
+ if(!(C.stat & (BROKEN|NOPOWER)) && (C.z in GLOB.station_z_levels))
var/obj/item/paper/P = new /obj/item/paper(C.loc)
P.name = "paper - '[title]'"
P.info = text
diff --git a/code/_globalvars/lists/mapping.dm b/code/_globalvars/lists/mapping.dm
index e6aa0f8190eb47..a2d30b15289e05 100644
--- a/code/_globalvars/lists/mapping.dm
+++ b/code/_globalvars/lists/mapping.dm
@@ -14,6 +14,8 @@ GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
//Go away Urist, I'm restoring this to the longer list. ~Errorage
GLOBAL_LIST_INIT(accessable_z_levels, list(1,3,4,5,6,7)) //Keep this to six maps, repeating z-levels is ok if needed
+GLOBAL_LIST_INIT(station_z_levels, list(ZLEVEL_STATION_PRIMARY))
+
GLOBAL_LIST(global_map)
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
@@ -52,4 +54,4 @@ GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can
//used by jump-to-area etc. Updated by area/updateName()
GLOBAL_LIST_EMPTY(sortedAreas)
-GLOBAL_LIST_EMPTY(all_abstract_markers)
\ No newline at end of file
+GLOBAL_LIST_EMPTY(all_abstract_markers)
diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm
index 2c36e10d31aa86..f2bb300471afab 100644
--- a/code/controllers/subsystem/mapping.dm
+++ b/code/controllers/subsystem/mapping.dm
@@ -117,7 +117,7 @@ SUBSYSTEM_DEF(mapping)
var/start_time = REALTIMEOFDAY
INIT_ANNOUNCE("Loading [config.map_name]...")
- TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION)
+ TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION_PRIMARY)
INIT_ANNOUNCE("Loaded station in [(REALTIMEOFDAY - start_time)/10]s!")
if(SSdbcore.Connect())
var/datum/DBQuery/query_round_map_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET map_name = '[config.map_name]' WHERE id = [GLOB.round_id]")
diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm
index 10c6f8e5c4632f..4e58212b44da97 100644
--- a/code/controllers/subsystem/minimap.dm
+++ b/code/controllers/subsystem/minimap.dm
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(minimap)
var/const/MINIMAP_SIZE = 2048
var/const/TILE_SIZE = 8
- var/list/z_levels = list(ZLEVEL_STATION)
+ var/list/z_levels = list(ZLEVEL_STATION_PRIMARY)
/datum/controller/subsystem/minimap/Initialize(timeofday)
var/hash = md5(SSmapping.config.GetFullMapPath())
diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm
index 0137953a654836..13762b83f97e0d 100644
--- a/code/controllers/subsystem/persistence.dm
+++ b/code/controllers/subsystem/persistence.dm
@@ -35,7 +35,7 @@ SUBSYSTEM_DEF(persistence)
if(chosen_satchel.len == 3)
F.x = text2num(chosen_satchel[1])
F.y = text2num(chosen_satchel[2])
- F.z = ZLEVEL_STATION
+ F.z = ZLEVEL_STATION_PRIMARY
path = text2path(chosen_satchel[3])
else
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
@@ -50,7 +50,7 @@ SUBSYSTEM_DEF(persistence)
old_secret_satchels.Cut(pos, pos+1)
F.x = old_secret_satchels[pos]["x"]
F.y = old_secret_satchels[pos]["y"]
- F.z = ZLEVEL_STATION
+ F.z = ZLEVEL_STATION_PRIMARY
path = text2path(old_secret_satchels[pos]["saved_obj"])
if(!ispath(path))
return
@@ -59,7 +59,7 @@ SUBSYSTEM_DEF(persistence)
new path(F)
placed_satchel++
var/list/free_satchels = list()
- for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION)))) //Nontrivially expensive but it's roundstart only
+ for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION_PRIMARY), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION_PRIMARY)))) //Nontrivially expensive but it's roundstart only
if(isfloorturf(T) && !istype(T, /turf/open/floor/plating/))
free_satchels += new /obj/item/storage/backpack/satchel/flat/secret(T)
if(!isemptylist(free_satchels) && ((free_satchels.len + placed_satchel) >= (50 - old_secret_satchels.len) * 0.1)) //up to six tiles, more than enough to kill anything that moves
@@ -171,7 +171,7 @@ SUBSYSTEM_DEF(persistence)
satchel_blacklist = typecacheof(list(/obj/item/stack/tile/plasteel, /obj/item/crowbar))
for(var/A in new_secret_satchels)
var/obj/item/storage/backpack/satchel/flat/F = A
- if(QDELETED(F) || F.z != ZLEVEL_STATION || F.invisibility != INVISIBILITY_MAXIMUM)
+ if(QDELETED(F) || F.z != ZLEVEL_STATION_PRIMARY || F.invisibility != INVISIBILITY_MAXIMUM)
continue
var/list/savable_obj = list()
for(var/obj/O in F)
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index 1133986e6b720a..265134dff3e770 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -288,7 +288,7 @@ SUBSYSTEM_DEF(shuttle)
continue
var/turf/T = get_turf(thing)
- if(T && T.z == ZLEVEL_STATION)
+ if(T && (T.z in GLOB.station_z_levels))
callShuttle = 0
break
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 32f18b81fe5db9..dab7e28b93da44 100755
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -383,7 +383,7 @@ SUBSYSTEM_DEF(ticker)
if(bomb && bomb.loc)
bombloc = bomb.z
else if(!station_missed)
- bombloc = ZLEVEL_STATION
+ bombloc = ZLEVEL_STATION_PRIMARY
if(mode)
mode.explosion_in_progress = 0
diff --git a/code/datums/antagonists/datum_cult.dm b/code/datums/antagonists/datum_cult.dm
index d17b799ca2bfbe..8c05c54b21189e 100644
--- a/code/datums/antagonists/datum_cult.dm
+++ b/code/datums/antagonists/datum_cult.dm
@@ -40,7 +40,7 @@
if(!GLOB.summon_spots.len)
while(GLOB.summon_spots.len < SUMMON_POSSIBILITIES)
var/area/summon = pick(GLOB.sortedAreas - GLOB.summon_spots)
- if(summon && (summon.z == ZLEVEL_STATION) && summon.valid_territory)
+ if(summon && (summon.z in GLOB.station_z_levels) && summon.valid_territory)
GLOB.summon_spots += summon
SSticker.mode.cult_objectives += "eldergod"
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 7f09ffa48c18f8..9be242a391d4f8 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -413,7 +413,7 @@
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
- if(H.z != ZLEVEL_STATION)
+ if(!(H.z in GLOB.station_z_levels))
continue
if(!H.HasDisease(D))
H.ForceContractDisease(D)
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index 0946c8215ee7a0..0eb76388ae0806 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -162,7 +162,7 @@
// Safe location finder
-/proc/find_safe_turf(zlevel = ZLEVEL_STATION, list/zlevels, extended_safety_checks = FALSE)
+/proc/find_safe_turf(zlevel = ZLEVEL_STATION_PRIMARY, list/zlevels, extended_safety_checks = FALSE)
if(!zlevels)
zlevels = list(zlevel)
var/cycles = 1000
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 78c22c1b0dd48b..93857fa0e4f437 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -519,7 +519,7 @@
if(I == src)
continue
var/mob/M = I
- if(M.z == ZLEVEL_STATION && !M.stat)
+ if((M.z in GLOB.station_z_levels) && !M.stat)
last_healthy_headrev = FALSE
break
text += "head | not mindshielded | employee | [last_healthy_headrev ? "LAST " : ""]HEADREV | rev"
diff --git a/code/datums/weather/weather.dm b/code/datums/weather/weather.dm
index f4f2fc089c0dd8..a2abdf64a1a002 100644
--- a/code/datums/weather/weather.dm
+++ b/code/datums/weather/weather.dm
@@ -30,7 +30,7 @@
var/area_type = /area/space //Types of area to affect
var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins
var/list/protected_areas = list()//Areas that are protected and excluded from the affected areas.
- var/target_z = ZLEVEL_STATION //The z-level to affect
+ var/target_z = ZLEVEL_STATION_PRIMARY //The z-level to affect
var/overlay_layer = AREA_LAYER //Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
var/aesthetic = FALSE //If the weather has no purpose other than looks
diff --git a/code/datums/weather/weather_types.dm b/code/datums/weather/weather_types.dm
index 390164dbb3ee99..219555c7d030ce 100644
--- a/code/datums/weather/weather_types.dm
+++ b/code/datums/weather/weather_types.dm
@@ -17,7 +17,7 @@
area_type = /area
protected_areas = list(/area/space)
- target_z = ZLEVEL_STATION
+ target_z = ZLEVEL_STATION_PRIMARY
overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only
immunity_type = "lava"
@@ -48,7 +48,7 @@
end_duration = 0
area_type = /area
- target_z = ZLEVEL_STATION
+ target_z = ZLEVEL_STATION_PRIMARY
/datum/weather/advanced_darkness/update_areas()
for(var/V in impacted_areas)
@@ -142,7 +142,7 @@
area_type = /area
protected_areas = list(/area/maintenance, /area/ai_monitored/turret_protected/ai_upload, /area/ai_monitored/turret_protected/ai_upload_foyer,
/area/ai_monitored/turret_protected/ai, /area/storage/emergency/starboard, /area/storage/emergency/port, /area/shuttle)
- target_z = ZLEVEL_STATION
+ target_z = ZLEVEL_STATION_PRIMARY
immunity_type = "rad"
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 0baef4ace831c1..5acc64fbb86f2a 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if(GLOB.teleportlocs[AR.name])
continue
var/turf/picked = safepick(get_area_turfs(AR.type))
- if (picked && (picked.z == ZLEVEL_STATION))
+ if (picked && (picked.z in GLOB.station_z_levels))
GLOB.teleportlocs[AR.name] = AR
sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index cc57ca3b675c45..d9df92be41958c 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -559,7 +559,7 @@
flags_2 |= STATIONLOVING_2
/atom/movable/proc/relocate()
- var/targetturf = find_safe_turf(ZLEVEL_STATION)
+ var/targetturf = find_safe_turf(ZLEVEL_STATION_PRIMARY)
if(!targetturf)
if(GLOB.blobstart.len > 0)
targetturf = get_turf(pick(GLOB.blobstart))
@@ -591,7 +591,7 @@
/atom/movable/proc/in_bounds()
. = FALSE
var/turf/currentturf = get_turf(src)
- if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || currentturf.z == ZLEVEL_STATION || currentturf.z == ZLEVEL_TRANSIT))
+ if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || (currentturf.z in GLOB.station_z_levels) || currentturf.z == ZLEVEL_TRANSIT))
. = TRUE
diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm
index ab9c041efe6c43..15dd4157fe5778 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -238,7 +238,7 @@
/obj/item/antag_spawner/slaughter_demon/attack_self(mob/user)
- if(user.z != ZLEVEL_STATION)
+ if(!(user.z in GLOB.station_z_levels))
to_chat(user, "You should probably wait until you reach the station.")
return
if(used)
diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm
index bdcf459a05ef80..b6d31b1d5b1bc7 100644
--- a/code/game/gamemodes/blob/blob_report.dm
+++ b/code/game/gamemodes/blob/blob_report.dm
@@ -19,7 +19,7 @@
var/nukecode = random_nukecode()
for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
if(bomb && bomb.r_code)
- if(bomb.z == ZLEVEL_STATION)
+ if(bomb.z in GLOB.station_z_levels)
bomb.r_code = nukecode
intercepttext += "Nanotrasen Update: Biohazard Alert.
"
@@ -91,7 +91,7 @@
if(count_territories)
var/list/valid_territories = list()
for(var/area/A in world) //First, collect all area types on the station zlevel
- if(A.z == ZLEVEL_STATION)
+ if(A.z in GLOB.station_z_levels)
if(!(A.type in valid_territories) && A.valid_territory)
valid_territories |= A.type
if(valid_territories.len)
diff --git a/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm b/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm
index d6e56f38d5d228..d8281242ef2abb 100644
--- a/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm
+++ b/code/game/gamemodes/clock_cult/clock_helpers/scripture_checks.dm
@@ -31,7 +31,7 @@
var/mob/living/silicon/ai/AI = ai
if(AI.deployed_shell && is_servant_of_ratvar(AI.deployed_shell))
continue
- if(is_servant_of_ratvar(AI) || !isturf(AI.loc) || AI.z != ZLEVEL_STATION || AI.stat == DEAD)
+ if(is_servant_of_ratvar(AI) || !isturf(AI.loc) || !(AI.z in GLOB.station_z_levels) || AI.stat == DEAD)
continue
.++
diff --git a/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm b/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm
index 42be2ccddb6d16..bd356982b5b28a 100644
--- a/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm
+++ b/code/game/gamemodes/clock_cult/clock_items/replica_fabricator.dm
@@ -196,7 +196,7 @@
fabrication_values["power_cost"] = 0
var/turf/Y = get_turf(user)
- if(!Y || (Y.z != ZLEVEL_STATION && Y.z != ZLEVEL_CENTCOM && Y.z != ZLEVEL_MINING && Y.z != ZLEVEL_LAVALAND))
+ if(!Y || (!(Y.z in GLOB.station_z_levels) && Y.z != ZLEVEL_CENTCOM && Y.z != ZLEVEL_MINING && Y.z != ZLEVEL_LAVALAND))
fabrication_values["operation_time"] *= 2
if(fabrication_values["power_cost"] > 0)
fabrication_values["power_cost"] *= 2
diff --git a/code/game/gamemodes/clock_cult/clock_scripture.dm b/code/game/gamemodes/clock_cult/clock_scripture.dm
index 318d3e243d91ad..806d08dffb37c7 100644
--- a/code/game/gamemodes/clock_cult/clock_scripture.dm
+++ b/code/game/gamemodes/clock_cult/clock_scripture.dm
@@ -158,7 +158,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
/datum/clockwork_scripture/proc/check_offstation_penalty()
var/turf/T = get_turf(invoker)
- if(!T || (T.z != ZLEVEL_STATION && T.z != ZLEVEL_CENTCOM && T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND))
+ if(!T || (!(T.z in GLOB.station_z_levels) && T.z != ZLEVEL_CENTCOM && T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND))
channel_time *= 2
for(var/i in consumed_components)
if(consumed_components[i])
diff --git a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm
index d0b7f11eb4753a..2930088ca2b817 100644
--- a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm
+++ b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_applications.dm
@@ -175,7 +175,7 @@
to_chat(invoker, "\"It is too late to construct one of these, champion.\"")
return FALSE
var/turf/T = get_turf(invoker)
- if(!T || T.z != ZLEVEL_STATION)
+ if(!T || !(T.z in GLOB.station_z_levels))
to_chat(invoker, "\"You must be on the station to construct one of these, champion.\"")
return FALSE
return ..()
diff --git a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm
index e7beff846fabbf..c7daef145072f6 100644
--- a/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm
+++ b/code/game/gamemodes/clock_cult/clock_scriptures/scripture_judgement.dm
@@ -33,7 +33,7 @@
return FALSE
var/area/A = get_area(invoker)
var/turf/T = get_turf(invoker)
- if(!T || T.z != ZLEVEL_STATION || istype(A, /area/shuttle) || !A.blob_allowed)
+ if(!T || !(T.z in GLOB.station_z_levels) || istype(A, /area/shuttle) || !A.blob_allowed)
to_chat(invoker, "You must be on the station to activate the Ark!")
return FALSE
if(GLOB.clockwork_gateway_activated)
diff --git a/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm b/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm
index 9ef7fa4ab7f4e8..155413a6126cf3 100644
--- a/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm
+++ b/code/game/gamemodes/clock_cult/clock_structures/prolonging_prism.dm
@@ -48,7 +48,7 @@
if(active)
return 0
var/turf/T = get_turf(src)
- if(!T || T.z != ZLEVEL_STATION)
+ if(!T || !(T.z in GLOB.station_z_levels))
to_chat(user, "[src] must be on the station to function!")
return 0
if(SSshuttle.emergency.mode != SHUTTLE_CALL)
@@ -63,7 +63,7 @@
/obj/structure/destructible/clockwork/powered/prolonging_prism/process()
var/turf/own_turf = get_turf(src)
- if(SSshuttle.emergency.mode != SHUTTLE_CALL || delay_remaining <= 0 || !own_turf || own_turf.z != ZLEVEL_STATION)
+ if(SSshuttle.emergency.mode != SHUTTLE_CALL || delay_remaining <= 0 || !own_turf || !(own_turf.z in GLOB.station_z_levels))
forced_disable(FALSE)
return
. = ..()
@@ -97,7 +97,7 @@
mean_x = Ceiling(mean_x)
else
mean_x = Floor(mean_x)
- var/turf/semi_random_center_turf = locate(mean_x, mean_y, ZLEVEL_STATION)
+ var/turf/semi_random_center_turf = locate(mean_x, mean_y, ZLEVEL_STATION_PRIMARY)
for(var/t in getline(src, semi_random_center_turf))
prism_turfs[t] = TRUE
var/placement_style = prob(50)
diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm
index 624fa83a572709..e16f991af7d190 100644
--- a/code/game/gamemodes/cult/cult.dm
+++ b/code/game/gamemodes/cult/cult.dm
@@ -104,7 +104,7 @@
if(!GLOB.summon_spots.len)
while(GLOB.summon_spots.len < SUMMON_POSSIBILITIES)
var/area/summon = pick(GLOB.sortedAreas - GLOB.summon_spots)
- if((summon.z == ZLEVEL_STATION) && summon.valid_territory)
+ if((summon.z in GLOB.station_z_levels) && summon.valid_territory)
GLOB.summon_spots += summon
cult_objectives += "eldergod"
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index a9255e89daff1c..b9b1fb4fa0eecc 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -257,8 +257,10 @@ This file contains the arcane tome files.
to_chat(user, "There is already a rune here.")
return FALSE
- if(T.z != ZLEVEL_STATION && T.z != ZLEVEL_MINING)
+
+ if(!(T.z in GLOB.station_z_levels) && T.z != ZLEVEL_MINING)
to_chat(user, "The veil is not weak enough here.")
+
return FALSE
return TRUE
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 936afe9090611e..089265d2fbe1be 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -465,7 +465,7 @@ structure_check() searches for nearby cultist structures required for the invoca
/obj/effect/rune/narsie/invoke(var/list/invokers)
if(used)
return
- if(z != ZLEVEL_STATION)
+ if(!(z in GLOB.station_z_levels))
return
if(locate(/obj/singularity/narsie) in GLOB.poi_list)
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index e5576712e246e7..b405cc935c4519 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -1,7 +1,7 @@
/proc/power_failure()
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/ai/poweroff.ogg')
for(var/obj/machinery/power/smes/S in GLOB.machines)
- if(istype(get_area(S), /area/ai_monitored/turret_protected) || S.z != ZLEVEL_STATION)
+ if(istype(get_area(S), /area/ai_monitored/turret_protected) || !(S.z in GLOB.station_z_levels))
continue
S.charge = 0
S.output_level = 0
@@ -22,7 +22,7 @@
break
if(A.contents)
for(var/atom/AT in A.contents)
- if(AT.z != ZLEVEL_STATION) //Only check one, it's enough.
+ if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough.
skip = 1
break
if(skip) continue
@@ -32,7 +32,7 @@
A.power_change()
for(var/obj/machinery/power/apc/C in GLOB.apcs_list)
- if(C.cell && C.z == ZLEVEL_STATION)
+ if(C.cell && (C.z in GLOB.station_z_levels))
var/area/A = C.area
var/skip = 0
@@ -48,11 +48,11 @@
priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg')
for(var/obj/machinery/power/apc/C in GLOB.machines)
- if(C.cell && C.z == ZLEVEL_STATION)
+ if(C.cell && (C.z in GLOB.station_z_levels))
C.cell.charge = C.cell.maxcharge
C.failure_timer = 0
for(var/obj/machinery/power/smes/S in GLOB.machines)
- if(S.z != ZLEVEL_STATION)
+ if(!(S.z in GLOB.station_z_levels))
continue
S.charge = S.capacity
S.output_level = S.output_level_max
@@ -70,7 +70,7 @@
priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg')
for(var/obj/machinery/power/smes/S in GLOB.machines)
- if(S.z != ZLEVEL_STATION)
+ if(!(S.z in GLOB.station_z_levels))
continue
S.charge = S.capacity
S.output_level = S.output_level_max
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 2c44928601e4fc..311f2e505ac559 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -488,7 +488,7 @@
text += " died"
else
text += " survived"
- if(fleecheck && ply.current.z > ZLEVEL_STATION)
+ if(fleecheck && (!(ply.current.z in GLOB.station_z_levels)))
text += " while fleeing the station"
if(ply.current.real_name != ply.name)
text += " as [ply.current.real_name]"
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index 339a445db629d1..a81bc80a5a38b0 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -232,7 +232,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/nuke_station/Activate()
var/turf/T = get_turf(owner)
- if(!istype(T) || T.z != ZLEVEL_STATION)
+ if(!istype(T) || !(T.z in GLOB.station_z_levels))
to_chat(owner, "You cannot activate the doomsday device while off-station!")
return
if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;")
@@ -355,7 +355,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/obj/machinery/doomsday_device/process()
var/turf/T = get_turf(src)
- if(!T || T.z != ZLEVEL_STATION)
+ if(!T || !(T.z in GLOB.station_z_levels))
minor_announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE)
SSshuttle.clearHostileEnvironment(src)
qdel(src)
@@ -373,7 +373,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
milestones[key] = TRUE
minor_announce("[key] SECONDS UNTIL DOOMSDAY DEVICE ACTIVATION!", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE)
-/obj/machinery/doomsday_device/proc/detonate(z_level = ZLEVEL_STATION)
+/obj/machinery/doomsday_device/proc/detonate(z_level = ZLEVEL_STATION_PRIMARY)
sound_to_playing_players('sound/machines/alarm.ogg')
sleep(100)
for(var/mob/living/L in GLOB.mob_list)
@@ -425,7 +425,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/lockdown/Activate()
for(var/obj/machinery/door/D in GLOB.airlocks)
- if(D.z != ZLEVEL_STATION)
+ if(!(D.z in GLOB.station_z_levels))
continue
INVOKE_ASYNC(D, /obj/machinery/door.proc/hostile_lockdown, src)
addtimer(CALLBACK(D, /obj/machinery/door.proc/disable_lockdown), 900)
@@ -503,7 +503,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/break_fire_alarms/Activate()
for(var/obj/machinery/firealarm/F in GLOB.machines)
- if(F.z != ZLEVEL_STATION)
+ if(!(F.z in GLOB.station_z_levels))
continue
F.emagged = TRUE
to_chat(owner, "All thermal sensors on the station have been disabled. Fire alerts will no longer be recognized.")
@@ -530,7 +530,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
/datum/action/innate/ai/break_air_alarms/Activate()
for(var/obj/machinery/airalarm/AA in GLOB.machines)
- if(AA.z != ZLEVEL_STATION)
+ if(!(AA.z in GLOB.station_z_levels))
continue
AA.emagged = TRUE
to_chat(owner, "All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.")
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 0265b371945902..3bb3c8b43ed9c7 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -31,15 +31,15 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
var/max_i = 10//number of tries to spawn meteor.
while(!isspaceturf(pickedstart))
var/startSide = pick(GLOB.cardinals)
- pickedstart = spaceDebrisStartLoc(startSide, ZLEVEL_STATION)
- pickedgoal = spaceDebrisFinishLoc(startSide, ZLEVEL_STATION)
+ pickedstart = spaceDebrisStartLoc(startSide, ZLEVEL_STATION_PRIMARY)
+ pickedgoal = spaceDebrisFinishLoc(startSide, ZLEVEL_STATION_PRIMARY)
max_i--
if(max_i<=0)
return
var/Me = pickweight(meteortypes)
var/obj/effect/meteor/M = new Me(pickedstart)
M.dest = pickedgoal
- M.z_original = ZLEVEL_STATION
+ M.z_original = ZLEVEL_STATION_PRIMARY
spawn(0)
walk_towards(M, M.dest, 1)
@@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
pass_flags = PASSTABLE
var/heavy = 0
var/meteorsound = 'sound/effects/meteorimpact.ogg'
- var/z_original = ZLEVEL_STATION
+ var/z_original = ZLEVEL_STATION_PRIMARY
var/threat = 0 // used for determining which meteors are most interesting
var/lifetime = DEFAULT_METEOR_LIFETIME
diff --git a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm
index ffd1b88d2521a3..97893d6d2ee113 100644
--- a/code/game/gamemodes/miniantags/abduction/machinery/camera.dm
+++ b/code/game/gamemodes/miniantags/abduction/machinery/camera.dm
@@ -9,7 +9,7 @@
var/datum/action/innate/vest_disguise_swap/vest_disguise_action = new
var/datum/action/innate/set_droppoint/set_droppoint_action = new
var/obj/machinery/abductor/console/console
- z_lock = ZLEVEL_STATION
+ z_lock = ZLEVEL_STATION_PRIMARY
icon = 'icons/obj/abductor.dmi'
icon_state = "camera"
diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
index 2a7760dfc50f6f..8979fb8c784816 100644
--- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
+++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
@@ -458,7 +458,7 @@
if(target == src)
return
- if(z != ZLEVEL_STATION && z != ZLEVEL_LAVALAND)
+ if(!(z in GLOB.station_z_levels) && z != ZLEVEL_LAVALAND)
to_chat(src, "Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.")
return
@@ -469,8 +469,8 @@
var/turf/open/floor/F
switch(z) //Only the station/lavaland
- if(ZLEVEL_STATION)
- F =find_safe_turf(zlevels = ZLEVEL_STATION, extended_safety_checks = TRUE)
+ if(ZLEVEL_STATION_PRIMARY)
+ F =find_safe_turf(zlevels = ZLEVEL_STATION_PRIMARY, extended_safety_checks = TRUE)
if(ZLEVEL_LAVALAND)
F = find_safe_turf(zlevels = ZLEVEL_LAVALAND, extended_safety_checks = TRUE)
if(!F)
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 95fc735ec6ea97..5133fd26a4d69f 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -435,7 +435,7 @@
var/off_station = 0
var/turf/bomb_location = get_turf(src)
var/area/A = get_area(bomb_location)
- if(bomb_location && (bomb_location.z == ZLEVEL_STATION))
+ if(bomb_location && (bomb_location.z in GLOB.station_z_levels))
if(istype(A, /area/space))
off_station = NUKE_MISS_STATION
if((bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)))
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index ce91e96698e3bd..2108ba527c2579 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -126,7 +126,7 @@
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey)
return 1
var/turf/T = get_turf(target.current)
- if(T && (T.z > ZLEVEL_STATION) || (target.current.client && target.current.client.is_afk())) //If they leave the station or go afk they count as dead for this
+ if(T && (!(T.z in GLOB.station_z_levels)) || (target.current.client && target.current.client.is_afk())) //If they leave the station or go afk they count as dead for this
return 2
return 0
return 1
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index f393dc5338e03b..55fc57145954b5 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -335,7 +335,7 @@
/datum/game_mode/revolution/proc/check_heads_victory()
for(var/datum/mind/rev_mind in head_revolutionaries)
var/turf/T = get_turf(rev_mind.current)
- if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != DEAD) && T && (T.z == ZLEVEL_STATION))
+ if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != DEAD) && T && (T.z in GLOB.station_z_levels))
if(ishuman(rev_mind.current))
return 0
return 1
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index d56837b9ef6274..bc6833f84a150c 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -47,7 +47,7 @@
GLOB.cameranet.addCamera(src)
proximity_monitor = new(src, 1)
- if(mapload && z == ZLEVEL_STATION && prob(3) && !start_active)
+ if(mapload && (z in GLOB.station_z_levels) && prob(3) && !start_active)
toggle_cam()
/obj/machinery/camera/Destroy()
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index bf67e05f1139e0..bd203772cb4d9a 100755
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -54,7 +54,7 @@
/obj/machinery/computer/communications/Topic(href, href_list)
if(..())
return
- if (z != ZLEVEL_STATION && z != ZLEVEL_CENTCOM) //Can only use on centcom and SS13
+ if(!(z in GLOB.station_z_levels) && z != ZLEVEL_CENTCOM) //Can only use on centcom and SS13
to_chat(usr, "Unable to establish a connection: \black You're too far away from the station!")
return
usr.set_machine(src)
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index 56a6320640fe8c..a7626258ae7b01 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -56,7 +56,7 @@
var/loc_display = "Unknown"
var/mob/living/M = T.imp_in
- if(Tr.z == ZLEVEL_STATION && !isspaceturf(M.loc))
+ if((Tr.z in GLOB.station_z_levels) && !isspaceturf(M.loc))
var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 2b66b23db3a129..518cd8ab091e29 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -61,7 +61,7 @@
if(stat & NOPOWER)
return
- if(src.z == ZLEVEL_STATION)
+ if(src.z in GLOB.station_z_levels)
add_overlay("overlay_[GLOB.security_level]")
else
//var/green = SEC_LEVEL_GREEN
@@ -121,7 +121,7 @@
var/list/data = list()
data["emagged"] = emagged
- if(src.z == ZLEVEL_STATION)
+ if(src.z in GLOB.station_z_levels)
data["seclevel"] = get_security_level()
else
data["seclevel"] = "green"
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index 4cfc6809cc956d..5d6370188bd69c 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -107,7 +107,7 @@
var/line1
var/line2
if(SSshuttle.supply.mode == SHUTTLE_IDLE)
- if(SSshuttle.supply.z == ZLEVEL_STATION)
+ if(SSshuttle.supply.z in GLOB.station_z_levels)
line1 = "CARGO"
line2 = "Docked"
else
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 9077283a6861e4..5638b92b99cb02 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -106,7 +106,7 @@
// Off-Site Relays
//
-// You are able to send/receive signals from the station's z level (changeable in the ZLEVEL_STATION #define) if
+// You are able to send/receive signals from the station's z level (changeable in the ZLEVEL_STATION_PRIMARY #define) if
/obj/machinery/telecomms/relay/proc/toggle_level()
@@ -114,7 +114,7 @@
var/turf/position = get_turf(src)
// Toggle on/off getting signals from the station or the current Z level
- if(listening_level == ZLEVEL_STATION) // equals the station
+ if(listening_level in GLOB.station_z_levels) // equals the station
listening_level = position.z
return TRUE
return FALSE
diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm
index 5a24649cd9ce38..0e7532e9eb831c 100644
--- a/code/game/objects/items/devices/PDA/cart.dm
+++ b/code/game/objects/items/devices/PDA/cart.dm
@@ -437,14 +437,14 @@ Code:
switch(SSshuttle.supply.mode)
if(SHUTTLE_CALL)
menu += "Moving to "
- if(SSshuttle.supply.z != ZLEVEL_STATION)
+ if(!(SSshuttle.supply.z in GLOB.station_z_levels))
menu += "station"
else
menu += "centcom"
menu += " ([SSshuttle.supply.timeLeft(600)] Mins)"
else
menu += "At "
- if(SSshuttle.supply.z != ZLEVEL_STATION)
+ if(!(SSshuttle.supply.z in GLOB.station_z_levels))
menu += "centcom"
else
menu += "station"
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 392d361773a734..0a87627e8e77c2 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -622,7 +622,7 @@
if(3)
var/count = 0
for(var/mob/living/carbon/monkey/Monkey in world)
- if(Monkey.z == ZLEVEL_STATION)
+ if(Monkey.z in GLOB.station_z_levels)
count++
return "Kill all [count] of the monkeys on the station"
if(4)
diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm
index c277dd59e09791..f564374ba9436e 100644
--- a/code/modules/admin/secrets.dm
+++ b/code/modules/admin/secrets.dm
@@ -456,7 +456,7 @@
return
SSblackbox.add_details("admin_secrets_fun_used","Egalitarian Station")
for(var/obj/machinery/door/airlock/W in GLOB.machines)
- if(W.z == ZLEVEL_STATION && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
+ if((W.z in GLOB.station_z_levels) && !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")
priority_announce("CentCom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/ai/commandreport.ogg')
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 362ce2a1d82d16..d3bcde7c8932b6 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -509,7 +509,7 @@ GLOBAL_PROTECT(AdminProcCallCount)
for(var/area/A in world)
if(on_station)
var/turf/picked = safepick(get_area_turfs(A.type))
- if(picked && (picked.z == ZLEVEL_STATION))
+ if(picked && (picked.z in GLOB.station_z_levels))
if(!(A.type in areas_all) && !is_type_in_typecache(A, station_areas_blacklist))
areas_all.Add(A.type)
else if(!(A.type in areas_all))
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index c637389031c717..e8ba7c8bab4824 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -79,7 +79,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_CHANGELING in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
- if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
+ if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_CHANGELING) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
@@ -112,7 +112,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_REV in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
- if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
+ if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_REV) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
@@ -154,7 +154,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_CULTIST in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
- if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
+ if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_CULTIST) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
@@ -187,7 +187,7 @@
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
if(ROLE_SERVANT_OF_RATVAR in applicant.client.prefs.be_special)
var/turf/T = get_turf(applicant)
- if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
+ if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && (T.z in GLOB.station_z_levels))
if(!jobban_isbanned(applicant, ROLE_SERVANT_OF_RATVAR) && !jobban_isbanned(applicant, "Syndicate"))
if(temp.age_check(applicant.client))
if(!(applicant.job in temp.restricted_jobs))
diff --git a/code/modules/awaymissions/signpost.dm b/code/modules/awaymissions/signpost.dm
index 00012f8a40022e..f6fd4d9071fc68 100644
--- a/code/modules/awaymissions/signpost.dm
+++ b/code/modules/awaymissions/signpost.dm
@@ -5,11 +5,12 @@
anchored = TRUE
density = TRUE
var/question = "Travel back?"
- var/zlevels = list(ZLEVEL_STATION)
+ var/list/zlevels = list()
/obj/structure/signpost/New()
. = ..()
set_light(2)
+ zlevels = GLOB.station_z_levels
/obj/structure/signpost/attackby(obj/item/W, mob/user, params)
return attack_hand(user)
diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm
index e70a58a632c40e..546e0193f694d8 100644
--- a/code/modules/events/alien_infestation.dm
+++ b/code/modules/events/alien_infestation.dm
@@ -39,7 +39,7 @@
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
if(QDELETED(temp_vent))
continue
- if(temp_vent.loc.z == ZLEVEL_STATION && !temp_vent.welded)
+ if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
//Stops Aliens getting stuck in small networks.
//See: Security, Virology
diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm
index d655337ba68835..461ffecd3f7ddd 100644
--- a/code/modules/events/brand_intelligence.dm
+++ b/code/modules/events/brand_intelligence.dm
@@ -27,7 +27,7 @@
/datum/round_event/brand_intelligence/start()
for(var/obj/machinery/vending/V in GLOB.machines)
- if(V.z != ZLEVEL_STATION)
+ if(!(V.z in GLOB.station_z_levels))
continue
vendingMachines.Add(V)
if(!vendingMachines.len)
diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm
index 8f8ad97c0e1c2e..81e21b16e8f4fd 100644
--- a/code/modules/events/disease_outbreak.dm
+++ b/code/modules/events/disease_outbreak.dm
@@ -33,7 +33,7 @@
var/turf/T = get_turf(H)
if(!T)
continue
- if(T.z != ZLEVEL_STATION)
+ if(!(T.z in GLOB.station_z_levels))
continue
if(!H.client)
continue
diff --git a/code/modules/events/grid_check.dm b/code/modules/events/grid_check.dm
index c6ba4d1bd088ac..f1af035a294656 100644
--- a/code/modules/events/grid_check.dm
+++ b/code/modules/events/grid_check.dm
@@ -15,5 +15,5 @@
/datum/round_event/grid_check/start()
for(var/P in GLOB.apcs_list)
var/obj/machinery/power/apc/C = P
- if(C.cell && C.z == ZLEVEL_STATION)
+ if(C.cell && (C.z in GLOB.station_z_levels))
C.energy_fail(rand(30,120))
\ No newline at end of file
diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm
index ae58ece0bb4da0..c5a9c1a1423ea9 100644
--- a/code/modules/events/holiday/xmas.dm
+++ b/code/modules/events/holiday/xmas.dm
@@ -25,7 +25,7 @@
/datum/round_event/presents/start()
for(var/obj/structure/flora/tree/pine/xmas in world)
- if(xmas.z != ZLEVEL_STATION)
+ if(!(xmas.z in GLOB.station_z_levels))
continue
for(var/turf/open/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm
index 8371422521fec3..4cd718070be155 100644
--- a/code/modules/events/immovable_rod.dm
+++ b/code/modules/events/immovable_rod.dm
@@ -21,8 +21,8 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
/datum/round_event/immovable_rod/start()
var/startside = pick(GLOB.cardinals)
- var/turf/startT = spaceDebrisStartLoc(startside, ZLEVEL_STATION)
- var/turf/endT = spaceDebrisFinishLoc(startside, ZLEVEL_STATION)
+ var/turf/startT = spaceDebrisStartLoc(startside, ZLEVEL_STATION_PRIMARY)
+ var/turf/endT = spaceDebrisFinishLoc(startside, ZLEVEL_STATION_PRIMARY)
new /obj/effect/immovablerod(startT, endT)
/obj/effect/immovablerod
diff --git a/code/modules/events/portal_storm.dm b/code/modules/events/portal_storm.dm
index 9658d8b144e373..552179343c3c81 100644
--- a/code/modules/events/portal_storm.dm
+++ b/code/modules/events/portal_storm.dm
@@ -40,7 +40,7 @@
storm = storm = mutable_appearance('icons/obj/tesla_engine/energy_ball.dmi', "energy_ball_fast", FLY_LAYER)
storm.color = "#00FF00"
- station_areas = get_areas_in_z(ZLEVEL_STATION)
+ station_areas = get_areas_in_z(ZLEVEL_STATION_PRIMARY)
number_of_bosses = 0
for(var/boss in boss_types)
diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm
index 46b78895e0f9ec..ddafc43c06041a 100644
--- a/code/modules/events/radiation_storm.dm
+++ b/code/modules/events/radiation_storm.dm
@@ -16,4 +16,4 @@
//sound not longer matches the text, but an audible warning is probably good
/datum/round_event/radiation_storm/start()
- SSweather.run_weather("radiation storm",ZLEVEL_STATION)
\ No newline at end of file
+ SSweather.run_weather("radiation storm",ZLEVEL_STATION_PRIMARY)
\ No newline at end of file
diff --git a/code/modules/events/sentience.dm b/code/modules/events/sentience.dm
index a425c540b38524..253ef6a6394e15 100644
--- a/code/modules/events/sentience.dm
+++ b/code/modules/events/sentience.dm
@@ -31,7 +31,7 @@
var/list/potential = list()
for(var/mob/living/simple_animal/L in GLOB.living_mob_list)
var/turf/T = get_turf(L)
- if(T.z != ZLEVEL_STATION)
+ if(!(T.z in GLOB.station_z_levels))
continue
if(!(L in GLOB.player_list) && !L.mind)
potential += L
diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm
index f33a0ac7293814..0a4b07a9cb6ceb 100644
--- a/code/modules/events/spider_infestation.dm
+++ b/code/modules/events/spider_infestation.dm
@@ -22,7 +22,7 @@
/datum/round_event/spider_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in world)
- if(temp_vent.loc.z == ZLEVEL_STATION && !temp_vent.welded)
+ if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
if(temp_vent_parent.other_atmosmch.len > 20)
vents += temp_vent
diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm
index dc7fccf05b499b..f94d521e8dfc18 100644
--- a/code/modules/events/vent_clog.dm
+++ b/code/modules/events/vent_clog.dm
@@ -19,7 +19,7 @@
/datum/round_event/vent_clog/setup()
endWhen = rand(25, 100)
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
- if(temp_vent.loc.z == ZLEVEL_STATION && !temp_vent.welded)
+ if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
if(temp_vent_parent.other_atmosmch.len > 20)
vents += temp_vent
diff --git a/code/modules/events/wizard/advanced_darkness.dm b/code/modules/events/wizard/advanced_darkness.dm
index e6d20ad70d0298..0f68bb936e2688 100644
--- a/code/modules/events/wizard/advanced_darkness.dm
+++ b/code/modules/events/wizard/advanced_darkness.dm
@@ -13,4 +13,4 @@
/datum/round_event/wizard/darkness/start()
if(!started)
started = TRUE
- SSweather.run_weather("advanced darkness", ZLEVEL_STATION)
+ SSweather.run_weather("advanced darkness", ZLEVEL_STATION_PRIMARY)
diff --git a/code/modules/events/wizard/curseditems.dm b/code/modules/events/wizard/curseditems.dm
index 1dba06f239d33d..f5b6ae1cc1ef40 100644
--- a/code/modules/events/wizard/curseditems.dm
+++ b/code/modules/events/wizard/curseditems.dm
@@ -38,7 +38,7 @@
ruins_wizard_loadout = 1
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
- if(ruins_spaceworthiness && (H.z != ZLEVEL_STATION || isspaceturf(H.loc) || isplasmaman(H)))
+ if(ruins_spaceworthiness && !(H.z in GLOB.station_z_levels) || isspaceturf(H.loc) || isplasmaman(H))
continue //#savetheminers
if(ruins_wizard_loadout && H.mind && ((H.mind in SSticker.mode.wizards) || (H.mind in SSticker.mode.apprentices)))
continue
diff --git a/code/modules/events/wizard/lava.dm b/code/modules/events/wizard/lava.dm
index 190752cc681b7f..a4426ce928f035 100644
--- a/code/modules/events/wizard/lava.dm
+++ b/code/modules/events/wizard/lava.dm
@@ -12,4 +12,4 @@
/datum/round_event/wizard/lava/start()
if(!started)
started = TRUE
- SSweather.run_weather("the floor is lava", ZLEVEL_STATION)
+ SSweather.run_weather("the floor is lava", ZLEVEL_STATION_PRIMARY)
diff --git a/code/modules/events/wizard/petsplosion.dm b/code/modules/events/wizard/petsplosion.dm
index 05582043b9f51b..5654cbfe04e37a 100644
--- a/code/modules/events/wizard/petsplosion.dm
+++ b/code/modules/events/wizard/petsplosion.dm
@@ -8,7 +8,7 @@
/datum/round_event_control/wizard/petsplosion/preRunEvent()
for(var/mob/living/simple_animal/F in GLOB.living_mob_list)
- if(!ishostile(F) && F.z == ZLEVEL_STATION)
+ if(!ishostile(F) && (F.z in GLOB.station_z_levels))
mobs_to_dupe++
if(mobs_to_dupe > 100 || !mobs_to_dupe)
return EVENT_CANT_RUN
@@ -24,7 +24,7 @@
if(activeFor >= 30 * countdown) // 0 seconds : 2 animals | 30 seconds : 4 animals | 1 minute : 8 animals
countdown += 1
for(var/mob/living/simple_animal/F in GLOB.living_mob_list) //If you cull the heard before the next replication, things will be easier for you
- if(!ishostile(F) && F.z == ZLEVEL_STATION)
+ if(!ishostile(F) && (F.z in GLOB.station_z_levels))
new F.type(F.loc)
mobs_duped++
if(mobs_duped > 400)
diff --git a/code/modules/events/wizard/shuffle.dm b/code/modules/events/wizard/shuffle.dm
index e04cb2da2bd529..568a8fbc72b082 100644
--- a/code/modules/events/wizard/shuffle.dm
+++ b/code/modules/events/wizard/shuffle.dm
@@ -13,7 +13,7 @@
var/list/mobs = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
- if(H.z != ZLEVEL_STATION)
+ if(!(H.z in GLOB.station_z_levels))
continue //lets not try to strand people in space or stuck in the wizards den
moblocs += H.loc
mobs += H
diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm
index 167eb77cfc964e..6404307d34cbe6 100644
--- a/code/modules/events/wormholes.dm
+++ b/code/modules/events/wormholes.dm
@@ -21,7 +21,7 @@
/datum/round_event/wormholes/start()
for(var/turf/open/floor/T in world)
- if(T.z == ZLEVEL_STATION)
+ if(T.z in GLOB.station_z_levels)
pick_turfs += T
for(var/i = 1, i <= number_of_wormholes, i++)
diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm
index fbe5a1fb30ec9d..a28f450087d341 100644
--- a/code/modules/mining/aux_base.dm
+++ b/code/modules/mining/aux_base.dm
@@ -37,7 +37,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/list/options = params2list(possible_destinations)
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
- var/dat = "[z == ZLEVEL_STATION ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]
"
+ var/dat = "[(z in GLOB.station_z_levels) ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]
"
if(M)
var/destination_found
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
@@ -47,7 +47,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
continue
destination_found = 1
dat += "Send to [S.name]
"
- if(!destination_found && z == ZLEVEL_STATION) //Only available if miners are lazy and did not set an LZ using the remote.
+ if(!destination_found && (z in GLOB.station_z_levels)) //Only available if miners are lazy and did not set an LZ using the remote.
dat += "Prepare for blind drop? (Dangerous)
"
if(LAZYLEN(turrets))
dat += "
Perimeter Defense System: Enable All / Disable All
\
@@ -86,7 +86,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
return
if(href_list["move"])
- if(z != ZLEVEL_STATION && shuttleId == "colony_drop")
+ if(!(z in GLOB.station_z_levels && shuttleId == "colony_drop"))
to_chat(usr, "You can't move the base again!")
return
var/shuttle_error = SSshuttle.moveShuttle(shuttleId, href_list["move"], 1)
@@ -200,7 +200,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
var/obj/machinery/computer/auxillary_base/AB
for (var/obj/machinery/computer/auxillary_base/A in GLOB.machines)
- if(A.z == ZLEVEL_STATION)
+ if(A.z in GLOB.station_z_levels)
AB = A
break
if(!AB)
diff --git a/code/modules/mining/aux_base_camera.dm b/code/modules/mining/aux_base_camera.dm
index 56b7fe31755a61..1b245c209fff23 100644
--- a/code/modules/mining/aux_base_camera.dm
+++ b/code/modules/mining/aux_base_camera.dm
@@ -151,8 +151,7 @@
to_chat(owner, "You can only build within the mining base!")
return FALSE
-
- if(build_target.z != ZLEVEL_STATION)
+ if(!(build_target.z in GLOB.station_z_levels))
to_chat(owner, "The mining base has launched and can no longer be modified.")
return FALSE
diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm
index 00fdbfb561537b..e0197cc4e3c484 100644
--- a/code/modules/mining/equipment/wormhole_jaunter.dm
+++ b/code/modules/mining/equipment/wormhole_jaunter.dm
@@ -41,7 +41,7 @@
for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons)
var/turf/T = get_turf(B)
- if(T.z == ZLEVEL_STATION)
+ if(T.z in GLOB.station_z_levels)
destinations += B
return destinations
@@ -93,7 +93,7 @@
/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M)
if(!ismob(M) && !isobj(M)) //No don't teleport lighting and effects!
return
-
+
if(M.anchored && (!ismob(M) || (istype(M, /obj/mecha) && !mech_sized)))
return
diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm
index dba8e36ef41348..38e02474f4b007 100644
--- a/code/modules/mining/machine_redemption.dm
+++ b/code/modules/mining/machine_redemption.dm
@@ -102,7 +102,7 @@
smelt_ore(ore)
/obj/machinery/mineral/ore_redemption/proc/send_console_message()
- if(z != ZLEVEL_STATION)
+ if(!(z in GLOB.station_z_levels))
return
message_sent = TRUE
var/area/A = get_area(src)
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index 01b7f025d1298d..da0eb704f06989 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -69,7 +69,7 @@
var/global/list/dumb_rev_heads = list()
/obj/machinery/computer/shuttle/mining/attack_hand(mob/user)
- if(user.z == ZLEVEL_STATION && user.mind && (user.mind in SSticker.mode.head_revolutionaries) && !(user.mind in dumb_rev_heads))
+ if((user.z in GLOB.station_z_levels) && user.mind && (user.mind in SSticker.mode.head_revolutionaries) && !(user.mind in dumb_rev_heads))
to_chat(user, "You get a feeling that leaving the station might be a REALLY dumb idea...")
dumb_rev_heads += user.mind
return
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 1d289c15fe994c..418e07e44a0cdc 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -105,7 +105,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(turfs.len)
T = pick(turfs)
else
- T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION) //middle of the station
+ T = locate(round(world.maxx/2), round(world.maxy/2), ZLEVEL_STATION_PRIMARY) //middle of the station
loc = T
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 0c789231437b22..bcb4f92bd2482e 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -415,7 +415,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(drunkenness >= 91)
adjustBrainLoss(0.4)
if(prob(20) && !stat)
- if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && z == ZLEVEL_STATION) //QoL mainly
+ if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && (z in GLOB.station_z_levels)) //QoL mainly
to_chat(src, "You're so tired... but you can't miss that shuttle...")
else
to_chat(src, "Just a quick nap...")
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
index cebd5f7f65bbf4..473246becae4b7 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm
@@ -114,7 +114,7 @@ Difficulty: Medium
if(L.stat == DEAD)
visible_message("[src] butchers [L]!",
"You butcher [L], restoring your health!")
- if(z != ZLEVEL_STATION && !client) //NPC monsters won't heal while on station
+ if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
if(guidance)
adjustHealth(-L.maxHealth)
else
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
index 02ca4a4e26e206..c4618db620adf7 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
@@ -101,7 +101,7 @@
visible_message(
"[src] devours [L]!",
"You feast on [L], restoring your health!")
- if(z != ZLEVEL_STATION && !client) //NPC monsters won't heal while on station
+ if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
adjustBruteLoss(-L.maxHealth/2)
L.gib()
diff --git a/code/modules/modular_computers/file_system/programs/alarm.dm b/code/modules/modular_computers/file_system/programs/alarm.dm
index fc050545a5b03c..616fd15dd31794 100644
--- a/code/modules/modular_computers/file_system/programs/alarm.dm
+++ b/code/modules/modular_computers/file_system/programs/alarm.dm
@@ -13,7 +13,7 @@
var/has_alert = 0
var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list())
- var/alarm_z = list(ZLEVEL_STATION,ZLEVEL_LAVALAND)
+ var/alarm_z = list(ZLEVEL_STATION_PRIMARY,ZLEVEL_LAVALAND)
/datum/computer_file/program/alarm_monitor/process_tick()
..()
diff --git a/code/modules/modular_computers/file_system/programs/sm_monitor.dm b/code/modules/modular_computers/file_system/programs/sm_monitor.dm
index c12c83aaed7e0c..f4d0abad6de5ef 100644
--- a/code/modules/modular_computers/file_system/programs/sm_monitor.dm
+++ b/code/modules/modular_computers/file_system/programs/sm_monitor.dm
@@ -44,7 +44,7 @@
//var/valid_z_levels = (GetConnectedZlevels(T.z) & using_map.station_levels)
for(var/obj/machinery/power/supermatter_shard/S in GLOB.machines)
// Delaminating, not within coverage, not on a tile.
- if(!(S.z == ZLEVEL_STATION || S.z == ZLEVEL_MINING || S.z == T.z) || !istype(S.loc, /turf/))
+ if(!(S.z in GLOB.station_z_levels || S.z == ZLEVEL_MINING || S.z == T.z) || !istype(S.loc, /turf/))
continue
supermatters.Add(S)
diff --git a/code/modules/modular_computers/hardware/network_card.dm b/code/modules/modular_computers/hardware/network_card.dm
index 24c1580ea22ffd..8ed67d761bcac7 100644
--- a/code/modules/modular_computers/hardware/network_card.dm
+++ b/code/modules/modular_computers/hardware/network_card.dm
@@ -48,7 +48,7 @@
if(holder)
var/turf/T = get_turf(holder)
- if((T && istype(T)) && (T.z == ZLEVEL_STATION || T.z == ZLEVEL_MINING))
+ if((T && istype(T)) && ((T.z in GLOB.station_z_levels) || T.z == ZLEVEL_MINING))
// Computer is on station. Low/High signal depending on what type of network card you have
if(long_range)
return 2
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index fde9a59367bc4a..1545bfd4527292 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -848,7 +848,7 @@
if(!malf.can_shunt)
to_chat(malf, "You cannot shunt!")
return
- if(src.z != ZLEVEL_STATION)
+ if(!(src.z in GLOB.station_z_levels))
return
occupier = new /mob/living/silicon/ai(src, malf.laws, malf) //DEAR GOD WHY? //IKR????
occupier.adjustOxyLoss(malf.getOxyLoss())
diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm
index df969d869ebf1f..381dcbaa7580ed 100644
--- a/code/modules/power/singularity/narsie.dm
+++ b/code/modules/power/singularity/narsie.dm
@@ -54,7 +54,7 @@
var/mob/living/L = cult_mind.current
L.narsie_act()
for(var/mob/living/player in GLOB.player_list)
- if(player.stat != DEAD && player.loc.z == ZLEVEL_STATION && !iscultist(player))
+ if(player.stat != DEAD && (player.loc.z in GLOB.station_z_levels) && !iscultist(player))
souls_needed[player] = TRUE
soul_goal = round(1 + LAZYLEN(souls_needed) * 0.6)
INVOKE_ASYNC(src, .proc/begin_the_end)
diff --git a/code/modules/procedural_mapping/mapGenerators/repair.dm b/code/modules/procedural_mapping/mapGenerators/repair.dm
index f9b94bba89dd8a..9796535df7bf20 100644
--- a/code/modules/procedural_mapping/mapGenerators/repair.dm
+++ b/code/modules/procedural_mapping/mapGenerators/repair.dm
@@ -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)
diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm
index 496f607e946f67..e83061b23279ba 100644
--- a/code/modules/security_levels/security_levels.dm
+++ b/code/modules/security_levels/security_levels.dm
@@ -29,7 +29,7 @@ GLOBAL_VAR_INIT(security_level, 0)
SSshuttle.emergency.modTimer(2)
GLOB.security_level = SEC_LEVEL_GREEN
for(var/obj/machinery/firealarm/FA in GLOB.machines)
- if(FA.z == ZLEVEL_STATION)
+ if(FA.z in GLOB.station_z_levels)
FA.update_icon()
if(SEC_LEVEL_BLUE)
if(GLOB.security_level < SEC_LEVEL_BLUE)
@@ -42,7 +42,7 @@ GLOBAL_VAR_INIT(security_level, 0)
SSshuttle.emergency.modTimer(2)
GLOB.security_level = SEC_LEVEL_BLUE
for(var/obj/machinery/firealarm/FA in GLOB.machines)
- if(FA.z == ZLEVEL_STATION)
+ if(FA.z in GLOB.station_z_levels)
FA.update_icon()
if(SEC_LEVEL_RED)
if(GLOB.security_level < SEC_LEVEL_RED)
@@ -62,7 +62,7 @@ GLOBAL_VAR_INIT(security_level, 0)
CC.post_status("alert", "redalert")*/
for(var/obj/machinery/firealarm/FA in GLOB.machines)
- if(FA.z == ZLEVEL_STATION)
+ if(FA.z in GLOB.station_z_levels)
FA.update_icon()
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
pod.admin_controlled = 0
@@ -75,7 +75,7 @@ GLOBAL_VAR_INIT(security_level, 0)
SSshuttle.emergency.modTimer(0.5)
GLOB.security_level = SEC_LEVEL_DELTA
for(var/obj/machinery/firealarm/FA in GLOB.machines)
- if(FA.z == ZLEVEL_STATION)
+ if(FA.z in GLOB.station_z_levels)
FA.update_icon()
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
pod.admin_controlled = 0
diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm
index 32324ea233de75..9199e5eb147155 100644
--- a/code/modules/shuttle/navigation_computer.dm
+++ b/code/modules/shuttle/navigation_computer.dm
@@ -1,7 +1,7 @@
/obj/machinery/computer/camera_advanced/shuttle_docker
name = "navigation computer"
desc = "Used to designate a precise transit location for a spacecraft."
- z_lock = ZLEVEL_STATION
+ z_lock = ZLEVEL_STATION_PRIMARY
jump_action = null
var/datum/action/innate/shuttledocker_rotate/rotate_action = new
var/datum/action/innate/shuttledocker_place/place_action = new
diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index 4cfd19bc4eb66c..d2843b67f251d7 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -410,7 +410,7 @@
mode = SHUTTLE_RECALL
/obj/docking_port/mobile/proc/enterTransit()
- if(SSshuttle.lockdown && z == ZLEVEL_STATION) //emp went off, no escape
+ if(SSshuttle.lockdown && (z in GLOB.station_z_levels)) //emp went off, no escape
return
previous = null
// if(!destination)
@@ -574,7 +574,7 @@
if(move_mode & MOVE_AREA)
areas_to_move[old_area] = TRUE
-
+
old_turfs[place] = move_mode
/*******************************************All onShuttleMove procs******************************************/
diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm
index 8daceb039363f2..56c7b85410af43 100644
--- a/code/modules/shuttle/supply.dm
+++ b/code/modules/shuttle/supply.dm
@@ -45,7 +45,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
SSshuttle.supply = src
/obj/docking_port/mobile/supply/canMove()
- if(z == ZLEVEL_STATION)
+ if(z in GLOB.station_z_levels)
return check_blacklist(shuttle_areas)
return ..()
diff --git a/code/modules/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm
index f9d90dd34266f3..b21df4000cb5f4 100644
--- a/code/modules/shuttle/syndicate.dm
+++ b/code/modules/shuttle/syndicate.dm
@@ -47,7 +47,7 @@
desc = "Used to designate a precise transit location for the syndicate shuttle."
icon_screen = "syndishuttle"
icon_keyboard = "syndie_key"
- z_lock = ZLEVEL_STATION
+ z_lock = ZLEVEL_STATION_PRIMARY
shuttleId = "syndicate"
shuttlePortId = "syndicate_custom"
shuttlePortName = "custom location"
diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm
index 94cf2dfe9ccc4d..6639297e230a6c 100644
--- a/code/modules/station_goals/shield.dm
+++ b/code/modules/station_goals/shield.dm
@@ -31,7 +31,7 @@
/datum/station_goal/proc/get_coverage()
var/list/coverage = list()
for(var/obj/machinery/satellite/meteor_shield/A in GLOB.machines)
- if(!A.active || A.z != ZLEVEL_STATION)
+ if(!A.active || !(A.z in GLOB.station_z_levels))
continue
coverage |= view(A.kill_range,A)
return coverage.len