diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 160137a2e5b..424c93da029 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -463,16 +463,16 @@ if("max_maint_drones") config.max_maint_drones = text2num(value) - if("station_levels") + if("config.station_levels") config.station_levels = text2numlist(value, ";") - if("admin_levels") + if("config.admin_levels") config.admin_levels = text2numlist(value, ";") if("contact_levels") config.contact_levels = text2numlist(value, ";") - if("player_levels") + if("config.player_levels") config.player_levels = text2numlist(value, ";") if("expected_round_length") diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index a4cde9f99e0..23d9ff5aa18 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -190,7 +190,7 @@ teleatom.visible_message("\red The [teleatom] bounces off of the portal!") return 0 - if(destination.z == 2) //centcomm z-level + if((destination.z in config.admin_levels)) //centcomm z-level if(istype(teleatom, /obj/mecha)) var/obj/mecha/MM = teleatom MM.occupant << "\red The mech would not survive the jump to a location so far away!" @@ -200,6 +200,6 @@ return 0 - if(destination.z > 7) //Away mission z-levels + if(!(destination.z in config.player_levels)) //Away mission z-levels return 0 return 1 \ No newline at end of file diff --git a/code/datums/spell.dm b/code/datums/spell.dm index d6c2350510d..d131db35dda 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -60,7 +60,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin caster.reset_view(0) return 0 - if(user.z == 2 && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel + if((user.z in config.admin_levels) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel return 0 if(!skipcharge) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 0ee9267ca01..43c52ec018c 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -70,7 +70,7 @@ var/list/teleportlocs = list() var/list/turfs = get_area_turfs(AR.type) if(turfs.len) var/turf/picked = pick(turfs) - if (picked.z == 1) + if ((picked.z in config.station_levels)) teleportlocs += AR.name teleportlocs[AR.name] = AR @@ -83,13 +83,13 @@ var/list/ghostteleportlocs = list() /hook/startup/proc/setupGhostTeleportLocs() for(var/area/AR in world) if(ghostteleportlocs.Find(AR.name)) continue - if(istype(AR, /area/turret_protected/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome)) + if(istype(AR, /area/tdome)) ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR var/list/turfs = get_area_turfs(AR.type) if(turfs.len) var/turf/picked = pick(turfs) - if (picked.z == 1 || picked.z == 5 || picked.z == 3) + if ((picked.z in config.player_levels)) ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 32fb4496670..bbfafa046f1 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -58,7 +58,7 @@ var/list/blob_nodes = list() /datum/game_mode/blob/proc/get_nuke_code() var/nukecode = "ERROR" for(var/obj/machinery/nuclearbomb/bomb in world) - if(bomb && bomb.r_code && bomb.z == 1) + if(bomb && bomb.r_code && (bomb.z in config.station_levels)) nukecode = bomb.r_code return nukecode @@ -92,7 +92,7 @@ var/list/blob_nodes = list() 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 in config.station_levels) || istype(location, /turf/space)) location = null C.gib() @@ -182,7 +182,7 @@ var/list/blob_nodes = list() command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [get_nuke_code()] ", "Biohazard Alert", new_sound = 'sound/AI/blob_confirmed.ogg') set_security_level("gamma") var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world - if(V && V.z == 1) + if(V && (V.z in config.station_levels)) V.locked = 0 V.update_icon() send_intercept(2) diff --git a/code/game/gamemodes/blob/blob_finish.dm b/code/game/gamemodes/blob/blob_finish.dm index 868cd62a5f6..1c3e57d2e00 100644 --- a/code/game/gamemodes/blob/blob_finish.dm +++ b/code/game/gamemodes/blob/blob_finish.dm @@ -62,7 +62,7 @@ datum/game_mode/proc/auto_declare_completion_blob() if (istype(T, /turf/space)) numSpace += 1 else if(istype(T, /turf)) - if (M.z!=1) + if (!(M.z in config.station_levels)) numOffStation += 1 else numAlive += 1 diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 4b8dd6bf31d..20feb9044cb 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -61,7 +61,7 @@ proc/count() for(var/turf/T in world) - if(T.z != 1) + if(!(T.z in config.station_levels)) continue if(istype(T,/turf/simulated/floor)) @@ -83,7 +83,7 @@ src.r_wall += 1 for(var/obj/O in world) - if(O.z != 1) + if(!(O.z in config.station_levels)) continue if(istype(O, /obj/structure/window)) diff --git a/code/game/gamemodes/borer/borer.dm b/code/game/gamemodes/borer/borer.dm index 7ec3801be02..f5948f3a683 100644 --- a/code/game/gamemodes/borer/borer.dm +++ b/code/game/gamemodes/borer/borer.dm @@ -39,7 +39,7 @@ return 0 // not enough candidates for borer for(var/obj/machinery/atmospherics/unary/vent_pump/v in world) - if(!v.welded && v.z == STATION_Z) // No more spawning in atmos. Assuming the mappers did their jobs, anyway. + if(!v.welded && (v.z in config.station_levels)) found_vents.Add(v) // for each 2 possible borers, add one borer and one host diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index a2563b01a73..07794377d04 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -50,7 +50,7 @@ var/list/turfs = new var/turf/picked for(var/turf/simulated/floor/T in world) - if(T.z == 1) + if((T.z in config.station_levels)) turfs += T for(var/turf/simulated/floor/T in turfs) if(prob(20)) @@ -132,7 +132,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue for(var/datum/disease/D in H.viruses) foundAlready = 1 @@ -166,7 +166,7 @@ //command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg') var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && !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 @@ -194,7 +194,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 in config.station_levels)) continue L.flicker(50) sleep(100) @@ -203,7 +203,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue if(istype(H,/mob/living/carbon/human)) if(H.species.flags & IS_SYNTHETIC) @@ -222,7 +222,7 @@ var/turf/T = get_turf(M) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue M.apply_effect((rand(15,75)),IRRADIATE,0) sleep(100) @@ -429,21 +429,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing APCs" for (var/obj/machinery/power/apc/APC in world) - if(APC.z == 1) + if((APC.z in config.station_levels)) APC.ion_act() apcnum++ world << "Finished processing APCs. Processed: [apcnum]" spawn(0) world << "Started processing SMES" for (var/obj/machinery/power/smes/SMES in world) - if(SMES.z == 1) + if((SMES.z in config.station_levels)) SMES.ion_act() smesnum++ world << "Finished processing SMES. Processed: [smesnum]" spawn(0) world << "Started processing AIRLOCKS" for (var/obj/machinery/door/airlock/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks airlocknum++ spawn(0) @@ -452,7 +452,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing FIREDOORS" for (var/obj/machinery/door/firedoor/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) firedoornum++; spawn(0) D.ion_act() diff --git a/code/game/gamemodes/events/PortalStorm.dm b/code/game/gamemodes/events/PortalStorm.dm index 88e29f29032..1143a2d2e88 100644 --- a/code/game/gamemodes/events/PortalStorm.dm +++ b/code/game/gamemodes/events/PortalStorm.dm @@ -8,11 +8,11 @@ var/turf/picked for(var/turf/T in world) - if(T.z < 5 && istype(T,/turf/simulated/floor)) + if((T.z in config.player_levels) && istype(T,/turf/simulated/floor)) turfs += T for(var/turf/T in world) - if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor)) + if(prob(10) && (T.z in config.player_levels) && istype(T,/turf/simulated/floor)) spawn(50+rand(0,3000)) picked = pick(turfs) var/obj/portal/P = new /obj/portal( T ) diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm index 3eb1eece271..6ba085f98e5 100644 --- a/code/game/gamemodes/events/clang.dm +++ b/code/game/gamemodes/events/clang.dm @@ -78,7 +78,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 walk_towards(immrod, end,1) sleep(1) while (immrod) - if (immrod.z != 1) + if ((immrod.z in config.station_levels)) immrod.z = 1 if(immrod.loc == end) del(immrod) diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm index 2ee79e7c65b..bf23fcf684f 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 in config.station_levels)) continue for(var/turf/simulated/floor/T in orange(1,xmas)) for(var/i=1,i<=rand(1,5),i++) new /obj/item/weapon/a_gift(T) diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index 56077a43dce..53d6e0171f7 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -171,7 +171,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 in config.station_levels)) continue containers += S message_admins("\blue 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 127e877e96b..586e3cb08c4 100644 --- a/code/game/gamemodes/events/miniblob.dm +++ b/code/game/gamemodes/events/miniblob.dm @@ -21,7 +21,7 @@ sleep(-1) if(!blob_cores.len) break var/obj/effect/blob/B = pick(blob_cores) - if(B.z != 1) + if(!(B.z in config.station_levels)) continue B.Life() spawn(30) diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm index 202d30b737b..ed1c7fbded2 100644 --- a/code/game/gamemodes/events/power_failure.dm +++ b/code/game/gamemodes/events/power_failure.dm @@ -8,7 +8,7 @@ for(var/obj/machinery/power/smes/S in machines) var/area/current_area = get_area(S) - if(current_area.type in skipped_areas || S.z != 1) + if(current_area.type in skipped_areas || !(S.z in config.station_levels)) continue S.charge = 0 S.output = 0 @@ -19,7 +19,7 @@ for(var/obj/machinery/power/apc/C in world) var/area/current_area = get_area(C) - if(current_area.type in skipped_areas_apc || C.z != 1) + if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels)) continue if(C.cell) C.cell.charge = 0 @@ -32,13 +32,13 @@ command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg') for(var/obj/machinery/power/apc/C in machines) var/area/current_area = get_area(C) - if(current_area.type in skipped_areas_apc || C.z != 1) + if(current_area.type in skipped_areas_apc || !(C.z in config.station_levels)) continue if(C.cell) C.cell.charge = C.cell.maxcharge for(var/obj/machinery/power/smes/S in machines) var/area/current_area = get_area(S) - if(current_area.type in skipped_areas || S.z != 1) + if(current_area.type in skipped_areas || !(S.z in config.station_levels)) 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 41604714dde..83eb7ad882d 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 world) - if(T.z == 1) + if((T.z in config.station_levels)) pick_turfs += T if(pick_turfs.len) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index a989adee6be..6ece3bb13a1 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -246,12 +246,12 @@ var/global/datum/controller/gameticker/ticker var/obj/structure/stool/bed/temp_buckle = new(src) //Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around if(station_missed) - for(var/mob/living/M in living_mob_list) + for(var/mob/M in living_mob_list) M.buckled = temp_buckle //buckles the mob so it can't do anything if(M.client) M.client.screen += cinematic //show every client the cinematic else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived" - for(var/mob/living/M in living_mob_list) + for(var/mob/M in mob_list) M.buckled = temp_buckle if(M.client) M.client.screen += cinematic @@ -259,12 +259,13 @@ var/global/datum/controller/gameticker/ticker switch(M.z) if(0) //inside a crate or something var/turf/T = get_turf(M) - if(T && T.z==1) //we don't use M.death(0) because it calls a for(/mob) loop and - M.health = 0 - M.stat = DEAD + if(T && (T.z in config.station_levels)) + M.death(0) if(1) //on a z-level 1 turf. - M.health = 0 - M.stat = DEAD + M.death(0) + for(var/obj/effect/blob/core in blob_cores) + core.health = -10 + core.update_icon() //Now animate the cinematic switch(station_missed) @@ -319,7 +320,7 @@ var/global/datum/controller/gameticker/ticker world << sound('sound/effects/explosionfar.ogg') cinematic.icon_state = "summary_selfdes" for(var/mob/living/M in living_mob_list) - if(M.loc.z == 1) + if((M.loc.z in config.station_levels)) 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 7bccda38c63..973e8f4e427 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -1398,7 +1398,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 in config.station_levels))//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 8cfa326239b..f7abb6475cf 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -409,7 +409,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) var/off_station = 0 var/turf/bomb_location = get_turf(src) - if( bomb_location && (bomb_location.z == 1) ) + if( bomb_location && (bomb_location.z in config.station_levels) ) 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 e5157e50bd9..be2ac536afb 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -104,7 +104,7 @@ datum/objective/mutiny if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client) 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 in config.station_levels)) //If they leave the station they count as dead for this return 2 return 0 return 1 @@ -139,7 +139,7 @@ datum/objective/mutiny/rp 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 in config.station_levels)) //If they leave the station they count as dead for this rval = 2 return 0 return rval @@ -255,7 +255,7 @@ datum/objective/maroon if(target && target.current) if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 - if(target.current.z == 2) + if((target.current.z in config.admin_levels)) return 0 return 1 diff --git a/code/game/gamemodes/revolution/anti_revolution.dm b/code/game/gamemodes/revolution/anti_revolution.dm index 171e4aad816..d656ccffc73 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 in config.station_levels) && !head_mind.is_brigged(600)) if(ishuman(head_mind.current)) return 0 return 1 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 620844a5135..d8802a3f205 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -340,7 +340,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 != 2) && rev_mind.current.client && T && (T.z == 1)) + if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z in config.station_levels)) if(ishuman(rev_mind.current)) return 0 return 1 @@ -369,7 +369,7 @@ if(headrev.current) if(headrev.current.stat == DEAD) text += "died" - else if(headrev.current.z != 1) + else if(!(headrev.current.z in config.station_levels)) text += "fled the station" else text += "survived the revolution" @@ -392,7 +392,7 @@ if(rev.current) if(rev.current.stat == DEAD) text += "died" - else if(rev.current.z != 1) + else if(!(rev.current.z in config.station_levels)) text += "fled the station" else text += "survived the revolution" @@ -417,7 +417,7 @@ if(head.current) if(head.current.stat == DEAD) text += "died" - else if(head.current.z != 1) + else if(!(head.current.z in config.station_levels)) text += "fled the station" else text += "survived the revolution" diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 33977ca811e..110ff5769d1 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 in config.station_levels)) return 0 return 1 diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm index 91611404f86..acf8c879c3e 100644 --- a/code/game/gamemodes/scoreboard.dm +++ b/code/game/gamemodes/scoreboard.dm @@ -26,13 +26,13 @@ // Who is alive/dead, who escaped for (var/mob/living/silicon/ai/I in mob_list) - if (I.stat == 2 && I.z == 1) + if (I.stat == 2 && (I.z in config.station_levels)) score_deadaipenalty = 1 score_deadcrew += 1 for (var/mob/living/carbon/human/I in mob_list) // for (var/datum/ailment/disease/V in I.ailments) // if (!V.vaccine && !V.spread != "Remissive") score_disease++ - if (I.stat == 2 && I.z == 1) score_deadcrew += 1 + if (I.stat == 2 && (I.z in config.station_levels)) score_deadcrew += 1 if (I.job == "Clown") for(var/thing in I.attack_log) if(findtext(thing, "")) score_clownabuse++ @@ -102,7 +102,7 @@ if (location in bad_zone1) score_disc = 0 if (location in bad_zone2) score_disc = 0 if (location in bad_zone3) score_disc = 0 - if (A.loc.z != 1) score_disc = 0 + if (!(A.loc.z in config.station_levels)) score_disc = 0 */ if (score_nuked) for (var/obj/machinery/nuclearbomb/NUKE in machines) @@ -132,13 +132,13 @@ // Check station's power levels for (var/obj/machinery/power/apc/A in machines) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue for (var/obj/item/weapon/stock_parts/cell/C in A.contents) if (C.charge < 2300) score_powerloss += 1 // 200 charge leeway // Check how much uncleaned mess is on the station for (var/obj/effect/decal/cleanable/M in world) - if (M.z != 1) continue + if (!(M.z in config.station_levels)) continue if (istype(M, /obj/effect/decal/cleanable/blood/gibs/)) score_mess += 3 if (istype(M, /obj/effect/decal/cleanable/blood/)) score_mess += 1 // if (istype(M, /obj/effect/decal/cleanable/greenpuke)) score_mess += 1 diff --git a/code/game/gamemodes/xenos/xenos.dm b/code/game/gamemodes/xenos/xenos.dm index 261de0b2255..de841595de5 100644 --- a/code/game/gamemodes/xenos/xenos.dm +++ b/code/game/gamemodes/xenos/xenos.dm @@ -203,7 +203,7 @@ command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert") set_security_level("gamma") var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world - if(V && V.z == 1) + if(V && (V.z in config.station_levels)) V.locked = 0 V.update_icon() return ..() @@ -238,7 +238,7 @@ var/list/livingplayers = list() for(var/mob/M in player_list) var/turf/T = get_turf(M) - if((M) && (M.stat != 2) && M.client && T && (T.z == 1 || emergency_shuttle.departed && (T.z == 1 || T.z == 2))) + if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || emergency_shuttle.departed && ((T.z in config.station_levels) || (T.z in config.admin_levels)))) if(ishuman(M)) livingplayers += 1 return livingplayers.len diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 47c27591e99..a605ea7c384 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -4,7 +4,7 @@ /mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf) if(!T) return 1 - if(T.z == 2) + if((T.z in config.station_levels)) return 1 if(T.z > 6) return 1 @@ -224,7 +224,7 @@ /proc/trackable(atom/movable/M) var/turf/T = get_turf(M) - if(T && (T.z == 1 || T.z == 3 || T.z == 5)) + if(T && (T.z in config.contact_levels)) return 1 return near_camera(M) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index c8d44e03dbd..e5aeabf72ae 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -68,7 +68,7 @@ var/shuttle_call/shuttle_calls[0] if(..(href, href_list)) return 1 - if (!(src.z in list(STATION_Z,CENTCOMM_Z))) + if ((!(src.z in config.station_levels) && !(src.z in config.admin_levels))) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm index 118307839c1..79ce2e97edf 100644 --- a/code/game/machinery/computer/honkputer.dm +++ b/code/game/machinery/computer/honkputer.dm @@ -17,7 +17,7 @@ /obj/machinery/computer/HONKputer/Topic(href, href_list) if(..()) return 1 - if (src.z > 1) + if (!(src.z in config.station_levels)) usr << "\red 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 11b71274ca6..8340838f6e2 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -65,7 +65,7 @@ if(!T.implanted) continue var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in - if(M.z == 1 && !istype(M.loc, /turf/space)) + if((M.z in config.station_levels) && !istype(M.loc, /turf/space)) var/turf/mob_loc = get_turf_loc(M) loc_display = mob_loc.loc if(T.malfunction) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index b050fb624e1..de69e56b422 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -178,7 +178,7 @@ var/turf/T = get_turf(R) if (!T) continue - if(T.z == 2 || T.z > 7) + if((T.z in config.admin_levels) || T.z > 7) continue if(R.syndicate == 1 && emagged == 0) continue @@ -199,7 +199,7 @@ continue var/turf/T = get_turf(M) if(!T) continue - if(T.z == 2) continue + if((T.z in config.admin_levels)) continue var/tmpname = M.real_name if(areaindex[tmpname]) tmpname = "[tmpname] ([++areaindex[tmpname]])" @@ -221,7 +221,7 @@ var/turf/T = get_turf(R) if (!T || !R.teleporter_hub || !R.teleporter_console) continue - if(T.z == 2 || T.z > 7) + if((T.z in config.admin_levels) || T.z > 7) continue var/tmpname = T.loc.name if(areaindex[tmpname]) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index cf3cd0022a6..efe31d5bf62 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -389,7 +389,7 @@ range = RANGED action(atom/target) - if(!action_checks(target) || src.loc.z == 2) return + if(!action_checks(target) || (src.loc.z in config.admin_levels)) return var/turf/T = get_turf(target) if(T) set_ready_state(0) @@ -410,7 +410,7 @@ action(atom/target) - if(!action_checks(target) || src.loc.z == 2) return + if(!action_checks(target) || (src.loc.z in config.admin_levels)) return var/list/theareas = list() for(var/area/AR in orange(100, chassis)) if(AR in theareas) continue diff --git a/code/game/objects/items/devices/sensor_device.dm b/code/game/objects/items/devices/sensor_device.dm index e32f489696b..5db0bdc47f4 100644 --- a/code/game/objects/items/devices/sensor_device.dm +++ b/code/game/objects/items/devices/sensor_device.dm @@ -5,7 +5,7 @@ icon_state = "scanner" w_class = 2.0 slot_flags = SLOT_BELT - origin_tech = "programming=3;materials=3;magnets=3" + origin_tech = "biotech=3;materials=3;magnets=3" var/obj/nano_module/crew_monitor/crew_monitor /obj/item/device/sensor_device/New() diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 88bb08b7ae8..7098afc009d 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -48,7 +48,7 @@ Frequency: if (usr.stat || usr.restrained()) return var/turf/current_location = get_turf(usr)//What turf is the user on? - if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2. + if(!current_location||(current_location.z in config.admin_levels))//If turf was not found or they're on z level 2. usr << "The [src] is malfunctioning." return if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) @@ -138,7 +138,7 @@ Frequency: /obj/item/weapon/hand_tele/attack_self(mob/user as mob) var/turf/current_location = get_turf(user)//What turf is the user on? - if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist. + if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist. user << "\The [src] is malfunctioning." return var/list/L = list( ) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index f4b35c40ba2..a5dc3d6ef4d 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -781,7 +781,7 @@ var/global/nologevent = 0 /datum/admins/proc/unprison(var/mob/M in mob_list) set category = "Admin" set name = "Unprison" - if (M.z == 2) + if ((M.z in config.admin_levels)) M.loc = pick(latejoin) message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1) log_admin("[key_name(usr)] has unprisoned [key_name(M)]") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 77ddef563fb..859abc10446 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1429,7 +1429,7 @@ foo += text("Is an AI | ") else foo += text("Make AI | ", src, M) - if(M.z != 2) + if(!(M.z in config.admin_levels)) foo += text("Prison | ", src, M) foo += text("Maze | ", src, M) else @@ -1809,7 +1809,7 @@ return else for(var/obj/machinery/photocopier/faxmachine/F in allfaxes) - if(F.z == 1) + if((F.z in config.station_levels)) if(!F.receivefax(P)) src.owner << "\red Message transmission to [F.department] failed." @@ -2206,7 +2206,7 @@ for(var/mob/living/carbon/human/H in mob_list) var/turf/loc = find_loc(H) var/security = 0 - if(loc.z > 1 || prisonwarped.Find(H)) + if(!(loc.z in config.station_levels) || prisonwarped.Find(H)) //don't warp them if they aren't ready or are already there continue @@ -2519,7 +2519,7 @@ message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.", 1) for(var/turf/simulated/floor/F in world) - if(F.z == 1) + if((F.z in config.station_levels)) F.name = "lava" F.desc = "The floor is LAVA!" F.overlays += "lava" @@ -2544,7 +2544,7 @@ sleep(10) for(var/turf/simulated/floor/F in world) // Reset everything. - if(F.z == 1) + if((F.z in config.station_levels)) F.name = initial(F.name) F.desc = initial(F.desc) F.overlays.Cut() @@ -2592,7 +2592,7 @@ feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","EgL") for(var/obj/machinery/door/airlock/W in world) - 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 in config.station_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") command_announcement.Announce("Centcomm airlock control override activated. Please take this time to get acquainted with your coworkers.", new_sound = 'sound/AI/commandreport.ogg') diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 43658f3c74c..0176f93cdd3 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -912,7 +912,7 @@ Traitors and the like can also be revived with the previous role mostly intact. set desc = "switches between 1x and custom views" if(view == world.view) - view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128) + view = input("Select view range:", "View Range", 9) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128) else view = world.view diff --git a/code/modules/computer3/computers/communications.dm b/code/modules/computer3/computers/communications.dm index 5a32b40643a..dd22bde09ec 100644 --- a/code/modules/computer3/computers/communications.dm +++ b/code/modules/computer3/computers/communications.dm @@ -59,7 +59,7 @@ Topic(var/href, var/list/href_list) if(!interactable() || !computer.radio || ..(href,href_list) ) return - if (computer.z > 1) + if (!(computer.z in config.station_levels)) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index c6601aac260..b69a656ca1d 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -21,7 +21,7 @@ /datum/event/alien_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && !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 64d02bfce1f..abc3fa87d48 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -38,14 +38,14 @@ /datum/event/blob/proc/announce_nuke() var/nukecode = "ERROR" for(var/obj/machinery/nuclearbomb/bomb in world) - if(bomb && bomb.r_code && bomb.z == 1) + if(bomb && bomb.r_code && (bomb.z in config.station_levels)) nukecode = bomb.r_code command_announcement.Announce("The biohazard has grown out of control and will soon reach critical mass. Activate the nuclear failsafe to maintain quarantine. The Nuclear Authentication Code is [nukecode] ", "Biohazard Alert") set_security_level("gamma") var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world - if(V && V.z == 1) + if(V && (V.z in config.station_levels)) V.locked = 0 V.update_icon() diff --git a/code/modules/events/borers.dm b/code/modules/events/borers.dm index fe7c51fc800..14010e22fc3 100644 --- a/code/modules/events/borers.dm +++ b/code/modules/events/borers.dm @@ -17,7 +17,7 @@ /datum/event/borer_infestation/start() var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network) //Stops cortical borers getting stuck in small networks. See: Security, Virology if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index 7bf1bada95b..4f2616e7c0f 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -12,7 +12,7 @@ /datum/event/brand_intelligence/start() for(var/obj/machinery/vending/V in machines) - if(V.z != 1) continue + if(!(V.z in config.station_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 082791999a3..ec4ea8b8d3a 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 in config.station_levels)) 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 2f7703764eb..9e8f5d43b57 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -212,21 +212,21 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing APCs" for (var/obj/machinery/power/apc/APC in world) - if(APC.z == 1) + if((APC.z in config.station_levels)) APC.ion_act() apcnum++ world << "Finished processing APCs. Processed: [apcnum]" spawn(0) world << "Started processing SMES" for (var/obj/machinery/power/smes/SMES in world) - if(SMES.z == 1) + if((SMES.z in config.station_levels)) SMES.ion_act() smesnum++ world << "Finished processing SMES. Processed: [smesnum]" spawn(0) world << "Started processing AIRLOCKS" for (var/obj/machinery/door/airlock/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks airlocknum++ spawn(0) @@ -235,7 +235,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is spawn(0) world << "Started processing FIREDOORS" for (var/obj/machinery/door/firedoor/D in world) - if(D.z == 1) + if((D.z in config.station_levels)) firedoornum++; spawn(0) D.ion_act() diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 5f57115cc11..5daabc84799 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -25,7 +25,7 @@ command_announcement.Announce("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg') for(var/area/A in world) - if(A.z != 1 || is_safe_zone(A)) + if(!(A.z in config.station_levels) || is_safe_zone(A)) continue A.radiation_alert() @@ -44,7 +44,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1 || is_safe_zone(T.loc)) + if(!(T.z in config.station_levels) || is_safe_zone(T.loc)) continue if(istype(H,/mob/living/carbon/human)) @@ -63,7 +63,7 @@ var/turf/T = get_turf(M) if(!T) continue - if(T.z != 1) + if(!(T.z in config.station_levels)) continue M.apply_effect((rand(5,25)),IRRADIATE,0) sleep(100) @@ -72,7 +72,7 @@ command_announcement.Announce("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") for(var/area/A in world) - if(A.z != 1 || is_safe_zone(A)) + if(!(A.z in config.station_levels) || is_safe_zone(A)) continue A.reset_radiation_alert() diff --git a/code/modules/events/sayuevents/undead.dm b/code/modules/events/sayuevents/undead.dm index f9d82baf086..84c1c0bb1b1 100644 --- a/code/modules/events/sayuevents/undead.dm +++ b/code/modules/events/sayuevents/undead.dm @@ -8,7 +8,7 @@ RS.start() RS.kill() for(var/area/A) - if(A.z != 1) continue //Spook on main station only. + if(!(A.z in config.station_levels)) continue //Spook on main station only. if(A.luminosity) continue // if(A.lighting_space) continue if(A.type == /area) continue diff --git a/code/modules/events/sayuevents/wormholes.dm b/code/modules/events/sayuevents/wormholes.dm index 2755768ca79..c31645d7a00 100644 --- a/code/modules/events/sayuevents/wormholes.dm +++ b/code/modules/events/sayuevents/wormholes.dm @@ -13,7 +13,7 @@ /datum/event/wormholes/start() for(var/turf/simulated/floor/T in world) - if(T.z == 1) + if((T.z in config.station_levels)) pick_turfs += T for(var/i = 1, i <= number_of_wormholes, i++) diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm index 43ee40fe1d7..227737ba99c 100644 --- a/code/modules/events/spider_infestation.dm +++ b/code/modules/events/spider_infestation.dm @@ -18,7 +18,7 @@ var/list/vents = list() for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world) - if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded && temp_vent.network) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/modules/events/tgevents/anomaly_bluespace.dm b/code/modules/events/tgevents/anomaly_bluespace.dm index 9a36ca226c5..852680e69fa 100644 --- a/code/modules/events/tgevents/anomaly_bluespace.dm +++ b/code/modules/events/tgevents/anomaly_bluespace.dm @@ -21,7 +21,7 @@ var/obj/item/device/radio/beacon/chosen var/list/possible = list() for(var/obj/item/device/radio/beacon/W in world) - if(W.z != 1) + if(!(W.z in config.station_levels)) continue possible += W diff --git a/code/modules/events/tgevents/vent_clog.dm b/code/modules/events/tgevents/vent_clog.dm index e66174cfa41..061450a197d 100755 --- a/code/modules/events/tgevents/vent_clog.dm +++ b/code/modules/events/tgevents/vent_clog.dm @@ -12,7 +12,7 @@ /datum/event/vent_clog/setup() endWhen = rand(25, 100) for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in machines) - if(temp_vent.loc.z == 1 && temp_vent.network) + if((temp_vent.loc.z in config.station_levels) && temp_vent.network) if(temp_vent.network.normal_members.len > 50) vents += temp_vent diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 1a0315b957d..82bc3a0f287 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -324,7 +324,7 @@ var/list/L = list() for(var/obj/item/device/radio/beacon/B in world) var/turf/T = get_turf(B) - if(T.z == 1) + if((T.z in config.station_levels)) L += B if(!L.len) user << "The [src.name] failed to create a wormhole." diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index fd3598ae985..866b46bae50 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -84,7 +84,7 @@ /obj/item/weapon/ore/New() pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 - if(src.z == 5) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) + if(src.z == ASTEROID_Z) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet) /obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/device/core_sampler)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8eb38c1e7b0..8319046d5d5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1537,7 +1537,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc // Not on the station or mining? var/turf/temp_turf = get_turf(remoteview_target) - if((temp_turf.z != 1 && temp_turf.z != 5) || remoteview_target.stat!=CONSCIOUS) + if((!(temp_turf.z in config.contact_levels)) || remoteview_target.stat!=CONSCIOUS) src << "\red Your psy-connection grows too faint to maintain!" isRemoteObserve = 0 if(!isRemoteObserve && client && !client.adminobs) diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm index c9541858467..dfa05ddc5d0 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 world) - if(commconsole.z == 2) + if((commconsole.z in config.admin_levels)) 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 in config.admin_levels)) 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 in config.admin_levels)) continue if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) break diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 15699572da4..2e09cd993a9 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -942,7 +942,7 @@ malfai.malfhacking = 0 locked = 1 if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs++ if(usr:parent) src.malfai = usr:parent @@ -974,7 +974,7 @@ if(malfai) if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) operating ? ticker.mode:apcs++ : ticker.mode:apcs-- src.update() @@ -989,7 +989,7 @@ if(!malf.can_shunt) malf << "You cannot shunt." return - if(src.z != 1) + if(!(src.z in config.station_levels)) return src.occupant = new /mob/living/silicon/ai(src,malf.laws,null,1) src.occupant.adjustOxyLoss(malf.getOxyLoss()) @@ -1038,7 +1038,7 @@ /obj/machinery/power/apc/proc/ion_act() //intended to be exactly the same as an AI malf attack - if(!src.malfhack && src.z == 1) + if(!src.malfhack && (src.z in config.station_levels)) if(prob(3)) src.locked = 1 if (src.cell.charge > 0) @@ -1307,7 +1307,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) /obj/machinery/power/apc/proc/set_broken() if(malfai && operating) if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs-- stat |= BROKEN operating = 0 @@ -1333,7 +1333,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) /obj/machinery/power/apc/Destroy() if(malfai && operating) if (ticker.mode.config_tag == "malfunction") - if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas)) + if ((src.z in config.station_levels)) //if (is_type_in_list(get_area(src), the_station_areas)) ticker.mode:apcs-- area.power_light = 0 area.power_equip = 0 diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index df04bacdc70..c9ac32da530 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -123,7 +123,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 O.main_part = null qdel(O) for(var/area/A in world) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue A.gravitychange(0,A) shake_everyone() ..() @@ -294,7 +294,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 investigate_log("was brought online and is now producing gravity for this level.", "gravity") message_admins("The gravity generator was brought online. ([area.name])") for(var/area/A in world) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue A.gravitychange(1,A) else if(gravity_in_level() == 1) @@ -302,7 +302,7 @@ var/const/GRAV_NEEDS_WRENCH = 3 investigate_log("was brought offline and there is now no gravity for this level.", "gravity") message_admins("The gravity generator was brought offline with no backup generator. ([area.name])") for(var/area/A in world) - if (A.z != 1) continue + if (!(A.z in config.station_levels)) continue A.gravitychange(0,A) update_icon() diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index a3065ce3bb4..3fe245d34dd 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -421,7 +421,7 @@ /obj/machinery/power/smes/proc/ion_act() - if(src.z == 1) + if((src.z in config.station_levels)) if(prob(1)) //explosion world << "\red SMES explosion in [src.loc.loc]" for(var/mob/M in viewers(src)) diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 2e57d543125..d22d31ceeae 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -81,7 +81,7 @@ name = "Handheld Crew Monitor" desc = "A device for tracking crew members on the station." id = "sensor_device" - req_tech = list("biotech" = 4, "magnets" = 4) + req_tech = list("biotech" = 4, "magnets" = 3, "materials" = 3) build_type = PROTOLATHE materials = list("$metal" = 30, "$glass" = 20) reliability_base = 76 diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm index 0fb411b2894..5ac35d1188e 100644 --- a/code/modules/security levels/security levels.dm +++ b/code/modules/security levels/security levels.dm @@ -33,7 +33,7 @@ security_level = SEC_LEVEL_GREEN for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_green") @@ -45,7 +45,7 @@ security_level = SEC_LEVEL_BLUE for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue") @@ -57,7 +57,7 @@ security_level = SEC_LEVEL_RED var/obj/machinery/door/airlock/highsecurity/red/R = locate(/obj/machinery/door/airlock/highsecurity/red) in world - if(R && R.z == 1) + if(R && (R.z in config.station_levels)) R.locked = 0 R.update_icon() @@ -66,7 +66,7 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_red") @@ -78,12 +78,12 @@ if(security_level < SEC_LEVEL_RED) for(var/obj/machinery/door/airlock/highsecurity/red/R in world) - if(R.z == 1) + if((R.z in config.station_levels)) R.locked = 0 R.update_icon() for(var/obj/machinery/door/airlock/hatch/gamma/H in world) - if(H.z == 1) + if((H.z in config.station_levels)) H.locked = 0 H.update_icon() @@ -92,7 +92,7 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_gamma") FA.update_icon() @@ -106,7 +106,7 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_epsilon") @@ -119,7 +119,7 @@ CC.post_status("alert", "redalert") for(var/obj/machinery/firealarm/FA in world) - if(FA.z == 1 || FA.z == 5) + if((FA.z in config.contact_levels)) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_delta") diff --git a/code/modules/store/store.dm b/code/modules/store/store.dm index 02a50c1b31a..41df9937fab 100644 --- a/code/modules/store/store.dm +++ b/code/modules/store/store.dm @@ -48,7 +48,7 @@ var/global/datum/store/centcomm_store=new /datum/store/proc/reconnect_database() for(var/obj/machinery/account_database/DB in world) - if(DB.z == 1) + if((DB.z in config.station_levels)) linked_db = DB break