Changes checks for zlevel 1 to map.zMainStation (#11379)

* Changes checks for zlevel 1 to map.zMainStation

* Replace all hard z-level checks with checks from _map.dm

* Hey look at all this manual z assignment (basically none)

* Whoops

* nanouwhy

* aaaa

* w h y
This commit is contained in:
sood
2016-08-14 11:19:02 -07:00
committed by ComicIronic
parent 8d2742fe65
commit 8cb1b0aaf3
48 changed files with 81 additions and 81 deletions

View File

@@ -142,12 +142,12 @@ datum/controller/game_controller/proc/buildcamlist()
if(!istype(cameranet) || !istype(cameranet.cameras) || !cameranet.cameras.len) if(!istype(cameranet) || !istype(cameranet.cameras) || !cameranet.cameras.len)
world.log << "cameranet has not been initialized before us, finding cameras manually." world.log << "cameranet has not been initialized before us, finding cameras manually."
for(var/obj/machinery/camera/C in world) //can't use machines list because cameras are removed from it. for(var/obj/machinery/camera/C in world) //can't use machines list because cameras are removed from it.
if(C.z == 1 || C.z == 5) if(C.z == map.zMainStation || C.z == map.zAsteroid)
var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"] var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"]
ourlist += C ourlist += C
else else
for(var/obj/machinery/camera/C in cameranet.cameras) //can't use machines list because cameras are removed from it. for(var/obj/machinery/camera/C in cameranet.cameras) //can't use machines list because cameras are removed from it.
if(C.z == 1 || C.z == 5) if(C.z == map.zMainStation || C.z == map.zAsteroid)
var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"] var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"]
ourlist += C ourlist += C
for(var/key in adv_camera.camerasbyzlevel) for(var/key in adv_camera.camerasbyzlevel)

View File

@@ -408,7 +408,7 @@ var/list/advance_cures = list(
AD.Refresh() AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list)) for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
if(H.z != 1) if(H.z != map.zMainStation)
continue continue
if(!H.has_disease(D)) if(!H.has_disease(D))
H.contract_disease(D, 1) H.contract_disease(D, 1)

View File

@@ -184,7 +184,7 @@
teleatom.visible_message("<span class='danger'>The [teleatom] bounces off of the portal!</span>") teleatom.visible_message("<span class='danger'>The [teleatom] bounces off of the portal!</span>")
return 0 return 0
if(destination.z == 2) //centcomm z-level if(destination.z == map.zCentcomm) //centcomm z-level
if(istype(teleatom, /obj/mecha) && (universe.name != "Supermatter Cascade")) if(istype(teleatom, /obj/mecha) && (universe.name != "Supermatter Cascade"))
var/obj/mecha/MM = teleatom var/obj/mecha/MM = teleatom
to_chat(MM.occupant, "<span class='danger'>The mech would not survive the jump to a location so far away!</span>")//seriously though, why? who wrote that? to_chat(MM.occupant, "<span class='danger'>The mech would not survive the jump to a location so far away!</span>")//seriously though, why? who wrote that?

View File

@@ -75,7 +75,7 @@ proc/process_teleport_locs()
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue
if(teleportlocs.Find(AR.name)) continue if(teleportlocs.Find(AR.name)) continue
var/turf/picked = safepick(get_area_turfs(AR.type)) var/turf/picked = safepick(get_area_turfs(AR.type))
if (picked && picked.z == 1) if (picked && picked.z == map.zMainStation)
teleportlocs += AR.name teleportlocs += AR.name
teleportlocs[AR.name] = AR teleportlocs[AR.name] = AR
@@ -90,7 +90,7 @@ proc/process_ghost_teleport_locs()
ghostteleportlocs += AR.name ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR ghostteleportlocs[AR.name] = AR
var/turf/picked = safepick(get_area_turfs(AR.type)) var/turf/picked = safepick(get_area_turfs(AR.type))
if (picked && (picked.z == 1 || picked.z == 5 || picked.z == 3)) if (picked && (picked.z == map.zMainStation || picked.z == map.zAsteroid || picked.z == map.zTCommSat))
ghostteleportlocs += AR.name ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR ghostteleportlocs[AR.name] = AR

View File

@@ -100,7 +100,7 @@ You must kill it all while minimizing the damage to the station."})
if(directory[ckey(blob.key)]) if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)] blob_client = directory[ckey(blob.key)]
location = get_turf(C) location = get_turf(C)
if(location.z != 1 || istype(location, /turf/space)) if(location.z != map.zMainStation || istype(location, /turf/space))
location = null location = null
qdel(C) qdel(C)

View File

@@ -30,7 +30,7 @@ Message ends."}
var/nukecode = "ERROR" var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in machines) for(var/obj/machinery/nuclearbomb/bomb in machines)
if(bomb && bomb.r_code) if(bomb && bomb.r_code)
if(bomb.z == 1) if(bomb.z == map.zMainStation)
nukecode = bomb.r_code nukecode = bomb.r_code
interceptname = "Directive 7-12" interceptname = "Directive 7-12"
intercepttext = {"<FONT size = 3><B>Nanotrasen Update</B>: Biohazard Alert.</FONT><HR> intercepttext = {"<FONT size = 3><B>Nanotrasen Update</B>: Biohazard Alert.</FONT><HR>
@@ -72,7 +72,7 @@ Message ends."}
proc/count() proc/count()
for(var/turf/T in turfs) for(var/turf/T in turfs)
if(T.z != 1) if(T.z != map.zMainStation)
continue continue
if(istype(T,/turf/simulated/floor)) if(istype(T,/turf/simulated/floor))
@@ -94,7 +94,7 @@ Message ends."}
src.r_wall += 1 src.r_wall += 1
for(var/obj/O in world) for(var/obj/O in world)
if(O.z != 1) if(O.z != map.zMainStation)
continue continue
if(istype(O, /obj/structure/window)) if(istype(O, /obj/structure/window))

View File

@@ -38,7 +38,7 @@
for(var/obj/effect/rune/R in rune_list) for(var/obj/effect/rune/R in rune_list)
if(R == src) if(R == src)
continue continue
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != 2) if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != map.zCentcomm)
index++ index++
allrunesloc.len = index allrunesloc.len = index
allrunesloc[index] = R.loc allrunesloc[index] = R.loc

View File

@@ -57,7 +57,7 @@
var/list/turfs = new var/list/turfs = new
var/turf/picked var/turf/picked
for(var/turf/simulated/floor/T in world) for(var/turf/simulated/floor/T in world)
if(T.z == 1) if(T.z == map.zMainStation)
turfs += T turfs += T
for(var/turf/simulated/floor/T in turfs) for(var/turf/simulated/floor/T in turfs)
if(prob(20)) if(prob(20))
@@ -151,7 +151,7 @@
var/turf/T = get_turf(H) var/turf/T = get_turf(H)
if(!T) if(!T)
continue continue
if(T.z != 1) if(T.z != map.zMainStation)
continue continue
for(var/datum/disease/D in H.viruses) for(var/datum/disease/D in H.viruses)
foundAlready = 1 foundAlready = 1
@@ -185,7 +185,7 @@
// world << sound('sound/AI/aliens.ogg') // world << sound('sound/AI/aliens.ogg')
var/list/vents = list() var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines) for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network && temp_vent.canSpawnMice) if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network && temp_vent.canSpawnMice)
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent vents += temp_vent
@@ -212,7 +212,7 @@
/* // Haha, this is way too laggy. I'll keep the prison break though. /* // Haha, this is way too laggy. I'll keep the prison break though.
for(var/obj/machinery/light/L in world) for(var/obj/machinery/light/L in world)
if(L.z != 1) continue if(L.z != map.zMainStation) continue
L.flicker(50) L.flicker(50)
sleep(100) sleep(100)
@@ -221,7 +221,7 @@
var/turf/T = get_turf(H) var/turf/T = get_turf(H)
if(!T) if(!T)
continue continue
if(T.z != 1) if(T.z != map.zMainStation)
continue continue
if(istype(H,/mob/living/carbon/human)) if(istype(H,/mob/living/carbon/human))
H.apply_effect((rand(15,75)),IRRADIATE,0) H.apply_effect((rand(15,75)),IRRADIATE,0)
@@ -238,7 +238,7 @@
var/turf/T = get_turf(M) var/turf/T = get_turf(M)
if(!T) if(!T)
continue continue
if(T.z != 1) if(T.z != map.zMainStation)
continue continue
M.apply_effect((rand(15,75)),IRRADIATE,0) M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100) sleep(100)

View File

@@ -83,7 +83,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
var/goal = locate(endx, endy, 1) var/goal = locate(endx, endy, 1)
src.x = startx src.x = startx
src.y = starty src.y = starty
src.z = 1 src.z = map.zMainStation
spawn(0) spawn(0)
walk_towards(src, goal, 1) walk_towards(src, goal, 1)
return return

View File

@@ -1,6 +1,6 @@
/proc/Christmas_Game_Start() /proc/Christmas_Game_Start()
for(var/obj/structure/flora/tree/pine/xmas in world) for(var/obj/structure/flora/tree/pine/xmas in world)
if(xmas.z != 1) continue if(xmas.z != map.zMainStation) continue
for(var/turf/simulated/floor/T in orange(1,xmas)) for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++) for(var/i=1,i<=rand(1,5),i++)
new /obj/item/weapon/winter_gift/regular(T) new /obj/item/weapon/winter_gift/regular(T)

View File

@@ -216,7 +216,7 @@ var/global/Holiday = null
var/list/obj/containers = list() var/list/obj/containers = list()
for(var/obj/item/weapon/storage/S in world) for(var/obj/item/weapon/storage/S in world)
if(S.z != 1) continue if(S.z != map.zMainStation) continue
containers += S containers += S
message_admins("<span class='notice'>DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])</span>")*/ message_admins("<span class='notice'>DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])</span>")*/

View File

@@ -22,7 +22,7 @@
sleep(-1) sleep(-1)
if(!blob_cores.len) break if(!blob_cores.len) break
var/obj/effect/blob/B = pick(blob_cores) var/obj/effect/blob/B = pick(blob_cores)
if(B.z != 1) if(B.z != map.zMainStation)
continue continue
B.Life() B.Life()
spawn(30) spawn(30)

View File

@@ -4,7 +4,7 @@
if(announce) if(announce)
command_alert(/datum/command_alert/power_outage) command_alert(/datum/command_alert/power_outage)
for(var/obj/machinery/power/battery/smes/S in power_machines) for(var/obj/machinery/power/battery/smes/S in power_machines)
if(istype(get_area(S), /area/turret_protected) || S.z != 1) if(istype(get_area(S), /area/turret_protected) || S.z != map.zMainStation)
continue continue
S.charge = 0 S.charge = 0
S.output = 0 S.output = 0
@@ -25,7 +25,7 @@
break break
if(A.contents) if(A.contents)
for(var/atom/AT in A.contents) for(var/atom/AT in A.contents)
if(AT.z != 1) //Only check one, it's enough. if(AT.z != map.zMainStation) //Only check one, it's enough.
skip = 1 skip = 1
break break
if(skip) continue if(skip) continue
@@ -34,7 +34,7 @@
A.power_environ = 0 A.power_environ = 0
for(var/obj/machinery/power/apc/C in power_machines) for(var/obj/machinery/power/apc/C in power_machines)
if(C.cell && C.z == 1) if(C.cell && C.z == map.zMainStation)
var/area/A = get_area(C) var/area/A = get_area(C)
var/skip = 0 var/skip = 0
for(var/area_type in skipped_areas) for(var/area_type in skipped_areas)
@@ -51,11 +51,11 @@
if(announce) if(announce)
command_alert(/datum/command_alert/power_restored) command_alert(/datum/command_alert/power_restored)
for(var/obj/machinery/power/apc/C in power_machines) for(var/obj/machinery/power/apc/C in power_machines)
if(C.cell && C.z == 1) if(C.cell && C.z == map.zMainStation)
C.cell.charge = C.cell.maxcharge C.cell.charge = C.cell.maxcharge
C.chargemode = 1 C.chargemode = 1
for(var/obj/machinery/power/battery/smes/S in power_machines) for(var/obj/machinery/power/battery/smes/S in power_machines)
if(S.z != 1) if(S.z != map.zMainStation)
continue continue
S.charge = S.capacity S.charge = S.capacity
S.output = 200000 S.output = 200000
@@ -73,7 +73,7 @@
if(announce) if(announce)
command_alert(/datum/command_alert/smes_charged) command_alert(/datum/command_alert/smes_charged)
for(var/obj/machinery/power/battery/smes/S in power_machines) for(var/obj/machinery/power/battery/smes/S in power_machines)
if(S.z != 1) if(S.z != map.zMainStation)
continue continue
S.charge = S.capacity S.charge = S.capacity
S.output = 200000 S.output = 200000

View File

@@ -2,7 +2,7 @@
spawn() spawn()
var/list/pick_turfs = list() var/list/pick_turfs = list()
for(var/turf/simulated/floor/T in turfs) for(var/turf/simulated/floor/T in turfs)
if(T.z == 1) if(T.z == map.zMainStation)
pick_turfs += T pick_turfs += T
if(pick_turfs.len) if(pick_turfs.len)

View File

@@ -322,7 +322,7 @@ var/global/datum/controller/gameticker/ticker
for(var/mob/living/M in living_mob_list) for(var/mob/living/M in living_mob_list)
if(M) if(M)
var/turf/T = get_turf(M) var/turf/T = get_turf(M)
if(T && T.z == 1) if(T && T.z == map.zMainStation)
M.death()//No mercy M.death()//No mercy
//If its actually the end of the round, wait for it to end. //If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards. //Otherwise if its a verb it will continue on afterwards.

View File

@@ -1372,7 +1372,7 @@ datum
var/turf/T = get_turf(target.current) var/turf/T = get_turf(target.current)
if(target.current.stat == 2) if(target.current.stat == 2)
return 1 return 1
else if((T) && (T.z != 1))//If they leave the station they count as dead for this else if((T) && (T.z != map.zMainStation))//If they leave the station they count as dead for this
return 2 return 2
else else
return 0 return 0

View File

@@ -285,7 +285,7 @@ var/bomb_set
var/off_station = 0 var/off_station = 0
var/turf/bomb_location = get_turf(src) var/turf/bomb_location = get_turf(src)
if( bomb_location && (bomb_location.z == 1) ) if( bomb_location && (bomb_location.z == map.zMainStation) )
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) ) if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
off_station = 1 off_station = 1
else else

View File

@@ -90,7 +90,7 @@ var/list/potential_theft_objectives=list(
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey) if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey)
return 1 return 1
var/turf/T = get_turf(target.current) var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this if(T && (T.z != map.zMainStation)) //If they leave the station they count as dead for this
return 2 return 2
return 0 return 0
return 1 return 1
@@ -124,7 +124,7 @@ var/list/potential_theft_objectives=list(
if(target in ticker.mode:head_revolutionaries) if(target in ticker.mode:head_revolutionaries)
return 1 return 1
var/turf/T = get_turf(target.current) var/turf/T = get_turf(target.current)
if(T && (T.z != 1)) //If they leave the station they count as dead for this if(T && (T.z != map.zMainStation)) //If they leave the station they count as dead for this
rval = 2 rval = 2
return 0 return 0
return rval return rval

View File

@@ -134,7 +134,7 @@
/datum/game_mode/anti_revolution/proc/check_crew_victory() /datum/game_mode/anti_revolution/proc/check_crew_victory()
for(var/datum/mind/head_mind in heads) for(var/datum/mind/head_mind in heads)
var/turf/T = get_turf(head_mind.current) var/turf/T = get_turf(head_mind.current)
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600)) if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == map.zMainStation) && !head_mind.is_brigged(600))
if(ishuman(head_mind.current)) if(ishuman(head_mind.current))
return 0 return 0
return 1 return 1

View File

@@ -124,7 +124,7 @@
// probably wanna export this stuff into a separate function for use by both // probably wanna export this stuff into a separate function for use by both
// revs and heads // revs and heads
//assume that only carbon mobs can become rev heads for now //assume that only carbon mobs can become rev heads for now
if(!rev_mind.current:handcuffed && T && T.z == 1) if(!rev_mind.current:handcuffed && T && T.z == map.zMainStation)
return 0 return 0
return 1 return 1

View File

@@ -113,7 +113,7 @@
score["disc"] = 0 score["disc"] = 0
if(location in bad_zone3) if(location in bad_zone3)
score["disc"] = 0 score["disc"] = 0
if(A.loc.z != 1) if(A.loc.z != map.zMainStation)
score["disc"] = 0 score["disc"] = 0
if(score["nuked"]) if(score["nuked"])

View File

@@ -57,7 +57,7 @@
var/turf/T = get_turf(M) var/turf/T = get_turf(M)
if(!T) if(!T)
continue continue
if(T.z == 2) if(T.z == map.zCentcomm)
continue continue
if(T.z > 6) if(T.z > 6)
continue continue

View File

@@ -52,7 +52,7 @@
var/loc_display = "Unknown" var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in var/mob/living/carbon/M = T.imp_in
if(!M) continue //Changeling monkeys break the console, bad monkeys. if(!M) continue //Changeling monkeys break the console, bad monkeys.
if(M.z == 1 && !istype(M.loc, /turf/space)) if(M.z == map.zMainStation && !istype(M.loc, /turf/space))
var/turf/mob_loc = get_turf(M) var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc loc_display = mob_loc.loc
if(T.malfunction) if(T.malfunction)

View File

@@ -376,7 +376,7 @@ Class Procs:
return 1 return 1
var/turf/T = get_turf(usr) var/turf/T = get_turf(usr)
if(!isAI(usr) && T.z != z) if(!isAI(usr) && T.z != z)
if(usr.z != 2) if(usr.z != map.zCentcomm)
to_chat(usr, "<span class='warning'>WARNING: Unable to interface with \the [src.name].</span>") to_chat(usr, "<span class='warning'>WARNING: Unable to interface with \the [src.name].</span>")
return 1 return 1
if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon)) if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))

View File

@@ -155,7 +155,7 @@
continue continue
var/turf/T = get_turf(M) var/turf/T = get_turf(M)
if(T) continue if(T) continue
if(T.z == 2) continue if(T.z == map.zCentcomm) continue
var/tmpname = M.real_name var/tmpname = M.real_name
if(areaindex[tmpname]) if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])" tmpname = "[tmpname] ([++areaindex[tmpname]])"

View File

@@ -600,7 +600,7 @@
range = RANGED range = RANGED
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target) /obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
if(!action_checks(target) || src.loc.z == 2) return if(!action_checks(target) || src.loc.z == map.zCentcomm) return
var/turf/T = get_turf(target) var/turf/T = get_turf(target)
if(T) if(T)
set_ready_state(0) set_ready_state(0)
@@ -620,7 +620,7 @@
/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target) /obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
if(!action_checks(target) || src.loc.z == 2) return if(!action_checks(target) || src.loc.z == map.zCentcomm) return
var/list/theareas = list() var/list/theareas = list()
for(var/area/AR in orange(100, chassis)) for(var/area/AR in orange(100, chassis))
if(AR in theareas) continue if(AR in theareas) continue

View File

@@ -567,7 +567,7 @@
I.loc = M.loc I.loc = M.loc
I.reset_plane_and_layer() I.reset_plane_and_layer()
I.dropped(M) I.dropped(M)
I.z = 2 I.z = map.zCentcomm
I.y = 68 I.y = 68
I.x = (thunderdomefightercount % 15) + 121 I.x = (thunderdomefightercount % 15) + 121

View File

@@ -168,7 +168,7 @@
var/locked_to_current_z = 0//To prevent the moveable atom from leaving this Z, examples are DAT DISK and derelict MoMMIs. var/locked_to_current_z = 0//To prevent the moveable atom from leaving this Z, examples are DAT DISK and derelict MoMMIs.
for(var/obj/item/weapon/disk/nuclear in contents_brought) for(var/obj/item/weapon/disk/nuclear in contents_brought)
locked_to_current_z = 1 locked_to_current_z = map.zMainStation
break break
//Check if it's a mob pulling an object //Check if it's a mob pulling an object
@@ -186,7 +186,7 @@
for(var/mob/living/silicon/robot/mommi in contents_brought) for(var/mob/living/silicon/robot/mommi in contents_brought)
if(mommi.locked_to_z != 0) if(mommi.locked_to_z != 0)
if(src.z == mommi.locked_to_z) if(src.z == mommi.locked_to_z)
locked_to_current_z = 1 locked_to_current_z = map.zMainStation
else else
to_chat(mommi, "<span class='warning'>You find your way back.</span>") to_chat(mommi, "<span class='warning'>You find your way back.</span>")
move_to_z = mommi.locked_to_z move_to_z = mommi.locked_to_z

View File

@@ -181,7 +181,7 @@ var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-ti
var/list/WORLD_X_OFFSET = list() var/list/WORLD_X_OFFSET = list()
var/list/WORLD_Y_OFFSET = list() var/list/WORLD_Y_OFFSET = list()
var/shuttle_z = 2 //default var/shuttle_z = map.zCentcomm //default
var/airtunnel_start = 68 // default var/airtunnel_start = 68 // default
var/airtunnel_stop = 68 // default var/airtunnel_stop = 68 // default
var/airtunnel_bottom = 72 // default var/airtunnel_bottom = 72 // default
@@ -423,4 +423,4 @@ var/adminblob_beat = 'sound/effects/blob_pulse.ogg'
//SPACE PARALLAX //SPACE PARALLAX
var/parallax_initialized = 0 var/parallax_initialized = 0
var/space_color = "#050505" var/space_color = "#050505"
var/list/parallax_icon[27] var/list/parallax_icon[27]

View File

@@ -1128,7 +1128,7 @@ var/global/floorIsLava = 0
set category = "Admin" set category = "Admin"
set name = "Unprison" set name = "Unprison"
if (M.z == 2) if (M.z == map.zCentcomm)
if (config.allow_admin_jump) if (config.allow_admin_jump)
M.loc = pick(latejoin) M.loc = pick(latejoin)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1) message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
@@ -1197,7 +1197,7 @@ var/global/floorIsLava = 0
if(3) if(3)
var/count = 0 var/count = 0
for(var/mob/living/carbon/monkey/Monkey in world) for(var/mob/living/carbon/monkey/Monkey in world)
if(Monkey.z == 1) if(Monkey.z == map.zMainStation)
count++ count++
return "Kill all [count] of the monkeys on the station" return "Kill all [count] of the monkeys on the station"
if(4) if(4)

View File

@@ -1779,7 +1779,7 @@
foo += text("<B>Is an AI</B> | ") foo += text("<B>Is an AI</B> | ")
else else
foo += text("<A HREF='?src=\ref[];makeai=\ref[]'>Make AI</A> | ", src, M) foo += text("<A HREF='?src=\ref[];makeai=\ref[]'>Make AI</A> | ", src, M)
if(M.z != 2) if(M.z != map.zCentcomm)
foo += text("<A HREF='?src=\ref[];sendtoprison=\ref[]'>Prison</A> | ", src, M) foo += text("<A HREF='?src=\ref[];sendtoprison=\ref[]'>Prison</A> | ", src, M)
foo += text("<A HREF='?src=\ref[];sendtomaze=\ref[]'>Maze</A> | ", src, M) foo += text("<A HREF='?src=\ref[];sendtomaze=\ref[]'>Maze</A> | ", src, M)
else else
@@ -2454,7 +2454,7 @@
feedback_add_details("admin_secrets_fun_used","DP") feedback_add_details("admin_secrets_fun_used","DP")
var/A = locate(/area/shuttle_prison) var/A = locate(/area/shuttle_prison)
for(var/atom/movable/AM as mob|obj in A) for(var/atom/movable/AM as mob|obj in A)
AM.z = 2 AM.z = map.zCentcomm
AM.Move() AM.Move()
*/ */
message_admins("<span class='notice'>[key_name_admin(usr)] sent the prison shuttle back.</span>", 1) message_admins("<span class='notice'>[key_name_admin(usr)] sent the prison shuttle back.</span>", 1)
@@ -2777,7 +2777,7 @@
for(var/turf/simulated/floor/F in turfs) for(var/turf/simulated/floor/F in turfs)
count++ count++
if(!(count % 50000)) sleep(world.tick_lag) if(!(count % 50000)) sleep(world.tick_lag)
if(F.z == 1) if(F.z == map.zMainStation)
F.name = "lava" F.name = "lava"
F.desc = "The floor is LAVA!" F.desc = "The floor is LAVA!"
F.overlays += image(icon = F.icon, icon_state = "lava") F.overlays += image(icon = F.icon, icon_state = "lava")
@@ -2803,7 +2803,7 @@
sleep(10) sleep(10)
for(var/turf/simulated/floor/F in lavaturfs) // Reset everything. for(var/turf/simulated/floor/F in lavaturfs) // Reset everything.
if(F.z == 1) if(F.z == map.zMainStation)
F.name = initial(F.name) F.name = initial(F.name)
F.desc = initial(F.desc) F.desc = initial(F.desc)
F.overlays.len = 0 F.overlays.len = 0
@@ -2882,7 +2882,7 @@
feedback_inc("admin_secrets_fun_used",1) feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL") feedback_add_details("admin_secrets_fun_used","EgL")
for(var/obj/machinery/door/airlock/W in all_doors) for(var/obj/machinery/door/airlock/W in all_doors)
if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison)) if(W.z == map.zMainStation && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list() W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode") message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
command_alert(/datum/command_alert/eagles) command_alert(/datum/command_alert/eagles)

View File

@@ -22,7 +22,7 @@
/datum/event/alien_infestation/start() /datum/event/alien_infestation/start()
var/list/vents = list() var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines) for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent vents += temp_vent

View File

@@ -84,7 +84,7 @@
if(directory[ckey(blob.key)]) if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)] blob_client = directory[ckey(blob.key)]
location = get_turf(C) location = get_turf(C)
if(location.z != 1 || istype(location, /turf/space)) if(location.z != map.zMainStation || istype(location, /turf/space))
location = null location = null
C.gib() C.gib()

View File

@@ -14,7 +14,7 @@
/datum/event/brand_intelligence/start() /datum/event/brand_intelligence/start()
for(var/obj/machinery/vending/V in machines) for(var/obj/machinery/vending/V in machines)
if(V.z != 1) continue if(V.z != map.zMainStation) continue
vendingMachines.Add(V) vendingMachines.Add(V)
if(!vendingMachines.len) if(!vendingMachines.len)

View File

@@ -16,7 +16,7 @@
var/turf/T = get_turf(H) var/turf/T = get_turf(H)
if(!T) if(!T)
continue continue
if(T.z != 1) if(T.z != map.zMainStation)
continue continue
for(var/datum/disease/D in H.viruses) for(var/datum/disease/D in H.viruses)
foundAlready = 1 foundAlready = 1

View File

@@ -301,21 +301,21 @@
spawn(0) spawn(0)
to_chat(world, "Started processing APCs") to_chat(world, "Started processing APCs")
for (var/obj/machinery/power/apc/APC in world) for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1) if(APC.z == map.zMainStation)
APC.ion_act() APC.ion_act()
apcnum++ apcnum++
to_chat(world, "Finished processing APCs. Processed: [apcnum]") to_chat(world, "Finished processing APCs. Processed: [apcnum]")
spawn(0) spawn(0)
to_chat(world, "Started processing SMES") to_chat(world, "Started processing SMES")
for (var/obj/machinery/power/smes/SMES in world) for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1) if(SMES.z == map.zMainStation)
SMES.ion_act() SMES.ion_act()
smesnum++ smesnum++
to_chat(world, "Finished processing SMES. Processed: [smesnum]") to_chat(world, "Finished processing SMES. Processed: [smesnum]")
spawn(0) spawn(0)
to_chat(world, "Started processing AIRLOCKS") to_chat(world, "Started processing AIRLOCKS")
for (var/obj/machinery/door/airlock/D in world) for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1) if(D.z == map.zMainStation)
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++ airlocknum++
spawn(0) spawn(0)
@@ -324,7 +324,7 @@
spawn(0) spawn(0)
to_chat(world, "Started processing FIREDOORS") to_chat(world, "Started processing FIREDOORS")
for (var/obj/machinery/door/firedoor/D in world) for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1) if(D.z == map.zMainStation)
firedoornum++; firedoornum++;
spawn(0) spawn(0)
D.ion_act() D.ion_act()

View File

@@ -10,7 +10,7 @@
/datum/event/money_hacker/setup() /datum/event/money_hacker/setup()
if(all_money_accounts.len) if(all_money_accounts.len)
for(var/obj/machinery/account_database/DB in account_DBs) for(var/obj/machinery/account_database/DB in account_DBs)
if( DB.z == 1 && !(DB.stat&NOPOWER) && DB.activated ) if( DB.z == map.zMainStation && !(DB.stat&NOPOWER) && DB.activated )
affected_db = DB affected_db = DB
break break
if(affected_db) if(affected_db)

View File

@@ -27,7 +27,7 @@
command_alert(/datum/command_alert/radiation_storm) command_alert(/datum/command_alert/radiation_storm)
for(var/area/A in areas) for(var/area/A in areas)
if(A.z != 1 || is_safe_zone(A)) if(A.z != map.zMainStation || is_safe_zone(A))
continue continue
var/area/ma = get_area_master(A) var/area/ma = get_area_master(A)
ma.radiation_alert() ma.radiation_alert()
@@ -50,7 +50,7 @@
var/turf/T = get_turf(H) var/turf/T = get_turf(H)
if(!T) if(!T)
continue continue
if(T.z != 1 || is_safe_zone(T.loc)) if(T.z != map.zMainStation || is_safe_zone(T.loc))
continue continue
var/applied_rads = (H.apply_effect(irradiationThisBurst,IRRADIATE,0) > (irradiationThisBurst/4)) var/applied_rads = (H.apply_effect(irradiationThisBurst,IRRADIATE,0) > (irradiationThisBurst/4))
@@ -69,7 +69,7 @@
command_alert(/datum/command_alert/radiation_storm/end) command_alert(/datum/command_alert/radiation_storm/end)
for(var/area/A in areas) for(var/area/A in areas)
if(A.z != 1 || is_safe_zone(A)) if(A.z != map.zMainStation || is_safe_zone(A))
continue continue
var/area/ma = get_area_master(A) var/area/ma = get_area_master(A)
ma.reset_radiation_alert() ma.reset_radiation_alert()

View File

@@ -37,7 +37,7 @@
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, locc) sparks.set_up(3, 0, locc)
sparks.start() sparks.start()
D.z = 2 D.z = map.zCentcomm
D.has_loot = 0 D.has_loot = 0
qdel(D) // Drone deletion handles removal from drones list qdel(D) // Drone deletion handles removal from drones list

View File

@@ -18,7 +18,7 @@
/datum/event/spider_infestation/start() /datum/event/spider_infestation/start()
var/list/vents = list() var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines) for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) if(temp_vent.network.normal_members.len > 50)
vents += temp_vent vents += temp_vent

View File

@@ -128,7 +128,7 @@ var/global/datum/interactive_map/camera/adv_camera = new
continue continue
if(pos.z != zz) if(pos.z != zz)
camerasbyzlevel["[zz]"] -= C //bad zlevel camerasbyzlevel["[zz]"] -= C //bad zlevel
if(pos.z == 1 || pos.z == 5) if(pos.z == map.zMainStation || pos.z == map.zAsteroid)
camerasbyzlevel["[zz]"] |= C //try to fix the zlevel list. camerasbyzlevel["[zz]"] |= C //try to fix the zlevel list.
continue continue
ID="\ref[C]" ID="\ref[C]"
@@ -149,7 +149,7 @@ var/global/datum/interactive_map/camera/adv_camera = new
var/turf/pos = get_turf(single) var/turf/pos = get_turf(single)
if(pos.z != zz) if(pos.z != zz)
camerasbyzlevel["[zz]"] -= single //bad zlevel camerasbyzlevel["[zz]"] -= single //bad zlevel
if(pos.z == 1 || pos.z == 5) if(pos.z == map.zMainStation || pos.z == map.zAsteroid)
camerasbyzlevel["[zz]"] |= single //try to fix the zlevel list camerasbyzlevel["[zz]"] |= single //try to fix the zlevel list
else adding = 2 //Set to remove else adding = 2 //Set to remove
ID="\ref[single]" ID="\ref[single]"

View File

@@ -268,7 +268,7 @@
var/turf/bombturf = get_turf(src) var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf) var/area/A = get_area(bombturf)
var/notify_admins = 0 var/notify_admins = 0
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel if(z != map.zAsteroid)//Only annoy the admins ingame if we're triggered off the mining zlevel
notify_admins = 1 notify_admins = 1
if(notify_admins) if(notify_admins)
if(triggered_by_explosive) if(triggered_by_explosive)

View File

@@ -268,7 +268,7 @@
var/turf/bombturf = get_turf(src) var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf) var/area/A = get_area(bombturf)
var/notify_admins = 0 var/notify_admins = 0
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel if(z != map.zAsteroid)//Only annoy the admins ingame if we're triggered off the mining zlevel
notify_admins = 1 notify_admins = 1
if(notify_admins) if(notify_admins)
if(triggered_by_explosive) if(triggered_by_explosive)

View File

@@ -993,7 +993,7 @@
return 0 return 0
if((temp_turf.z != our_turf.z) || M.stat!=CONSCIOUS) //Not on the same zlevel as us or they're dead. if((temp_turf.z != our_turf.z) || M.stat!=CONSCIOUS) //Not on the same zlevel as us or they're dead.
// to_chat(world, "[(temp_turf.z != our_turf.z) ? "not on the same zlevel as [M]" : "[M] is not concious"]") // to_chat(world, "[(temp_turf.z != our_turf.z) ? "not on the same zlevel as [M]" : "[M] is not concious"]")
if(temp_turf.z != 2) if(temp_turf.z != map.zCentcomm)
to_chat(src, "The mind of [M] is too faint...")//Prevent "The mind of Admin is too faint..." to_chat(src, "The mind of [M] is too faint...")//Prevent "The mind of Admin is too faint..."

View File

@@ -296,7 +296,7 @@
//Not on the station or mining? //Not on the station or mining?
var/turf/temp_turf = get_turf(remoteview_target) var/turf/temp_turf = get_turf(remoteview_target)
if(temp_turf && (temp_turf.z != 1 && temp_turf.z != 5) || remoteview_target.stat!=CONSCIOUS) if(temp_turf && (temp_turf.z != map.zMainStation && temp_turf.z != map.zAsteroid) || remoteview_target.stat!=CONSCIOUS)
to_chat(src, "<span class='warning'>Your psy-connection grows too faint to maintain!</span>") to_chat(src, "<span class='warning'>Your psy-connection grows too faint to maintain!</span>")
isRemoteObserve = 0 isRemoteObserve = 0
if(!isRemoteObserve && client && !client.adminobs && !isTeleViewing(client.eye)) if(!isRemoteObserve && client && !client.adminobs && !isTeleViewing(client.eye))

View File

@@ -15,21 +15,21 @@
var/callshuttle = 0 var/callshuttle = 0
for(var/obj/machinery/computer/communications/commconsole in machines) for(var/obj/machinery/computer/communications/commconsole in machines)
if(commconsole.z == 2) if(commconsole.z == map.zCentcomm)
continue continue
if(istype(commconsole.loc,/turf)) if(istype(commconsole.loc,/turf))
break break
callshuttle++ callshuttle++
for(var/obj/item/weapon/circuitboard/communications/commboard in world) for(var/obj/item/weapon/circuitboard/communications/commboard in world)
if(commboard.z == 2) if(commboard.z == map.zCentcomm)
continue continue
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
break break
callshuttle++ callshuttle++
for(var/mob/living/silicon/ai/shuttlecaller in player_list) for(var/mob/living/silicon/ai/shuttlecaller in player_list)
if(shuttlecaller.z == 2) if(shuttlecaller.z == map.zCentcomm)
continue continue
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf)) if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
break break

View File

@@ -508,10 +508,11 @@ nanoui is used to open and update nano browser uis
map_update = 1 map_update = 1
if(href_list["zlevel"]) if(href_list["zlevel"])
var/newz = input("Choose Z-Level to view.","Z-Levels",1) as null|anything in list(1,3,4,5,6) var/listed_zlevels = list(map.zMainStation, map.zTCommSat, map.zDerelict, map.zAsteroid, map.zDeepSpace)
var/newz = input("Choose Z-Level to view.","Z-Levels",1) as null|anything in listed_zlevels
if(!newz || isnull(newz)) if(!newz || isnull(newz))
return 0 return 0
if(newz < 1 || newz > 6 || newz == 2) if(!(newz in listed_zlevels))
to_chat(usr, "<span class='danger'>Unable to establish a connection</span>") to_chat(usr, "<span class='danger'>Unable to establish a connection</span>")
return 0 return 0
if(newz != map_z_level) if(newz != map_z_level)
@@ -546,4 +547,3 @@ nanoui is used to open and update nano browser uis
*/ */
/datum/nanoui/proc/update(var/force_open = 0) /datum/nanoui/proc/update(var/force_open = 0)
src_object.ui_interact(user, ui_key, src, force_open) src_object.ui_interact(user, ui_key, src, force_open)

View File

@@ -259,7 +259,7 @@ var/global/list/battery_online = list(
return 1 return 1
/obj/machinery/power/battery/proc/ion_act() /obj/machinery/power/battery/proc/ion_act()
if(src.z == 1) if(src.z == map.zMainStation)
if(prob(1)) //explosion if(prob(1)) //explosion
message_admins("<span class='warning'>SMES explosion in [get_area(src)]</span>") message_admins("<span class='warning'>SMES explosion in [get_area(src)]</span>")
src.visible_message("<span class='warning'>\The [src] is making strange noises!</span>", src.visible_message("<span class='warning'>\The [src] is making strange noises!</span>",