mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
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:
@@ -142,12 +142,12 @@ datum/controller/game_controller/proc/buildcamlist()
|
||||
if(!istype(cameranet) || !istype(cameranet.cameras) || !cameranet.cameras.len)
|
||||
world.log << "cameranet has not been initialized before us, finding cameras manually."
|
||||
for(var/obj/machinery/camera/C in world) //can't use machines list because cameras are removed from it.
|
||||
if(C.z == 1 || C.z == 5)
|
||||
if(C.z == map.zMainStation || C.z == map.zAsteroid)
|
||||
var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"]
|
||||
ourlist += C
|
||||
else
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras) //can't use machines list because cameras are removed from it.
|
||||
if(C.z == 1 || C.z == 5)
|
||||
if(C.z == map.zMainStation || C.z == map.zAsteroid)
|
||||
var/list/ourlist = adv_camera.camerasbyzlevel["[C.z]"]
|
||||
ourlist += C
|
||||
for(var/key in adv_camera.camerasbyzlevel)
|
||||
|
||||
@@ -408,7 +408,7 @@ var/list/advance_cures = list(
|
||||
AD.Refresh()
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
||||
if(H.z != 1)
|
||||
if(H.z != map.zMainStation)
|
||||
continue
|
||||
if(!H.has_disease(D))
|
||||
H.contract_disease(D, 1)
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
teleatom.visible_message("<span class='danger'>The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
if(destination.z == 2) //centcomm z-level
|
||||
if(destination.z == map.zCentcomm) //centcomm z-level
|
||||
if(istype(teleatom, /obj/mecha) && (universe.name != "Supermatter Cascade"))
|
||||
var/obj/mecha/MM = teleatom
|
||||
to_chat(MM.occupant, "<span class='danger'>The mech would not survive the jump to a location so far away!</span>")//seriously though, why? who wrote that?
|
||||
|
||||
@@ -75,7 +75,7 @@ proc/process_teleport_locs()
|
||||
if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue
|
||||
if(teleportlocs.Find(AR.name)) continue
|
||||
var/turf/picked = safepick(get_area_turfs(AR.type))
|
||||
if (picked && picked.z == 1)
|
||||
if (picked && picked.z == map.zMainStation)
|
||||
teleportlocs += AR.name
|
||||
teleportlocs[AR.name] = AR
|
||||
|
||||
@@ -90,7 +90,7 @@ proc/process_ghost_teleport_locs()
|
||||
ghostteleportlocs += AR.name
|
||||
ghostteleportlocs[AR.name] = AR
|
||||
var/turf/picked = safepick(get_area_turfs(AR.type))
|
||||
if (picked && (picked.z == 1 || picked.z == 5 || picked.z == 3))
|
||||
if (picked && (picked.z == map.zMainStation || picked.z == map.zAsteroid || picked.z == map.zTCommSat))
|
||||
ghostteleportlocs += AR.name
|
||||
ghostteleportlocs[AR.name] = AR
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ You must kill it all while minimizing the damage to the station."})
|
||||
if(directory[ckey(blob.key)])
|
||||
blob_client = directory[ckey(blob.key)]
|
||||
location = get_turf(C)
|
||||
if(location.z != 1 || istype(location, /turf/space))
|
||||
if(location.z != map.zMainStation || istype(location, /turf/space))
|
||||
location = null
|
||||
qdel(C)
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Message ends."}
|
||||
var/nukecode = "ERROR"
|
||||
for(var/obj/machinery/nuclearbomb/bomb in machines)
|
||||
if(bomb && bomb.r_code)
|
||||
if(bomb.z == 1)
|
||||
if(bomb.z == map.zMainStation)
|
||||
nukecode = bomb.r_code
|
||||
interceptname = "Directive 7-12"
|
||||
intercepttext = {"<FONT size = 3><B>Nanotrasen Update</B>: Biohazard Alert.</FONT><HR>
|
||||
@@ -72,7 +72,7 @@ Message ends."}
|
||||
|
||||
proc/count()
|
||||
for(var/turf/T in turfs)
|
||||
if(T.z != 1)
|
||||
if(T.z != map.zMainStation)
|
||||
continue
|
||||
|
||||
if(istype(T,/turf/simulated/floor))
|
||||
@@ -94,7 +94,7 @@ Message ends."}
|
||||
src.r_wall += 1
|
||||
|
||||
for(var/obj/O in world)
|
||||
if(O.z != 1)
|
||||
if(O.z != map.zMainStation)
|
||||
continue
|
||||
|
||||
if(istype(O, /obj/structure/window))
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
for(var/obj/effect/rune/R in rune_list)
|
||||
if(R == src)
|
||||
continue
|
||||
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != 2)
|
||||
if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != map.zCentcomm)
|
||||
index++
|
||||
allrunesloc.len = index
|
||||
allrunesloc[index] = R.loc
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/list/turfs = new
|
||||
var/turf/picked
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
if(T.z == map.zMainStation)
|
||||
turfs += T
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(prob(20))
|
||||
@@ -151,7 +151,7 @@
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
if(T.z != map.zMainStation)
|
||||
continue
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
@@ -185,7 +185,7 @@
|
||||
// world << sound('sound/AI/aliens.ogg')
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network && temp_vent.canSpawnMice)
|
||||
if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network && temp_vent.canSpawnMice)
|
||||
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
/* // Haha, this is way too laggy. I'll keep the prison break though.
|
||||
for(var/obj/machinery/light/L in world)
|
||||
if(L.z != 1) continue
|
||||
if(L.z != map.zMainStation) continue
|
||||
L.flicker(50)
|
||||
|
||||
sleep(100)
|
||||
@@ -221,7 +221,7 @@
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
if(T.z != map.zMainStation)
|
||||
continue
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
@@ -238,7 +238,7 @@
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
if(T.z != map.zMainStation)
|
||||
continue
|
||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
sleep(100)
|
||||
|
||||
@@ -83,7 +83,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
|
||||
var/goal = locate(endx, endy, 1)
|
||||
src.x = startx
|
||||
src.y = starty
|
||||
src.z = 1
|
||||
src.z = map.zMainStation
|
||||
spawn(0)
|
||||
walk_towards(src, goal, 1)
|
||||
return
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/proc/Christmas_Game_Start()
|
||||
for(var/obj/structure/flora/tree/pine/xmas in world)
|
||||
if(xmas.z != 1) continue
|
||||
if(xmas.z != map.zMainStation) continue
|
||||
for(var/turf/simulated/floor/T in orange(1,xmas))
|
||||
for(var/i=1,i<=rand(1,5),i++)
|
||||
new /obj/item/weapon/winter_gift/regular(T)
|
||||
|
||||
@@ -216,7 +216,7 @@ var/global/Holiday = null
|
||||
|
||||
var/list/obj/containers = list()
|
||||
for(var/obj/item/weapon/storage/S in world)
|
||||
if(S.z != 1) continue
|
||||
if(S.z != map.zMainStation) continue
|
||||
containers += S
|
||||
|
||||
message_admins("<span class='notice'>DEBUG: Event: Egg spawned at [Egg.loc] ([Egg.x],[Egg.y],[Egg.z])</span>")*/
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
sleep(-1)
|
||||
if(!blob_cores.len) break
|
||||
var/obj/effect/blob/B = pick(blob_cores)
|
||||
if(B.z != 1)
|
||||
if(B.z != map.zMainStation)
|
||||
continue
|
||||
B.Life()
|
||||
spawn(30)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
if(announce)
|
||||
command_alert(/datum/command_alert/power_outage)
|
||||
for(var/obj/machinery/power/battery/smes/S in power_machines)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != map.zMainStation)
|
||||
continue
|
||||
S.charge = 0
|
||||
S.output = 0
|
||||
@@ -25,7 +25,7 @@
|
||||
break
|
||||
if(A.contents)
|
||||
for(var/atom/AT in A.contents)
|
||||
if(AT.z != 1) //Only check one, it's enough.
|
||||
if(AT.z != map.zMainStation) //Only check one, it's enough.
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
@@ -34,7 +34,7 @@
|
||||
A.power_environ = 0
|
||||
|
||||
for(var/obj/machinery/power/apc/C in power_machines)
|
||||
if(C.cell && C.z == 1)
|
||||
if(C.cell && C.z == map.zMainStation)
|
||||
var/area/A = get_area(C)
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
@@ -51,11 +51,11 @@
|
||||
if(announce)
|
||||
command_alert(/datum/command_alert/power_restored)
|
||||
for(var/obj/machinery/power/apc/C in power_machines)
|
||||
if(C.cell && C.z == 1)
|
||||
if(C.cell && C.z == map.zMainStation)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
C.chargemode = 1
|
||||
for(var/obj/machinery/power/battery/smes/S in power_machines)
|
||||
if(S.z != 1)
|
||||
if(S.z != map.zMainStation)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
@@ -73,7 +73,7 @@
|
||||
if(announce)
|
||||
command_alert(/datum/command_alert/smes_charged)
|
||||
for(var/obj/machinery/power/battery/smes/S in power_machines)
|
||||
if(S.z != 1)
|
||||
if(S.z != map.zMainStation)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
spawn()
|
||||
var/list/pick_turfs = list()
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(T.z == 1)
|
||||
if(T.z == map.zMainStation)
|
||||
pick_turfs += T
|
||||
|
||||
if(pick_turfs.len)
|
||||
|
||||
@@ -322,7 +322,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
for(var/mob/living/M in living_mob_list)
|
||||
if(M)
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && T.z == 1)
|
||||
if(T && T.z == map.zMainStation)
|
||||
M.death()//No mercy
|
||||
//If its actually the end of the round, wait for it to end.
|
||||
//Otherwise if its a verb it will continue on afterwards.
|
||||
|
||||
@@ -1372,7 +1372,7 @@ datum
|
||||
var/turf/T = get_turf(target.current)
|
||||
if(target.current.stat == 2)
|
||||
return 1
|
||||
else if((T) && (T.z != 1))//If they leave the station they count as dead for this
|
||||
else if((T) && (T.z != map.zMainStation))//If they leave the station they count as dead for this
|
||||
return 2
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -285,7 +285,7 @@ var/bomb_set
|
||||
|
||||
var/off_station = 0
|
||||
var/turf/bomb_location = get_turf(src)
|
||||
if( bomb_location && (bomb_location.z == 1) )
|
||||
if( bomb_location && (bomb_location.z == map.zMainStation) )
|
||||
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
|
||||
off_station = 1
|
||||
else
|
||||
|
||||
@@ -90,7 +90,7 @@ var/list/potential_theft_objectives=list(
|
||||
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey)
|
||||
return 1
|
||||
var/turf/T = get_turf(target.current)
|
||||
if(T && (T.z != 1)) //If they leave the station they count as dead for this
|
||||
if(T && (T.z != map.zMainStation)) //If they leave the station they count as dead for this
|
||||
return 2
|
||||
return 0
|
||||
return 1
|
||||
@@ -124,7 +124,7 @@ var/list/potential_theft_objectives=list(
|
||||
if(target in ticker.mode:head_revolutionaries)
|
||||
return 1
|
||||
var/turf/T = get_turf(target.current)
|
||||
if(T && (T.z != 1)) //If they leave the station they count as dead for this
|
||||
if(T && (T.z != map.zMainStation)) //If they leave the station they count as dead for this
|
||||
rval = 2
|
||||
return 0
|
||||
return rval
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
/datum/game_mode/anti_revolution/proc/check_crew_victory()
|
||||
for(var/datum/mind/head_mind in heads)
|
||||
var/turf/T = get_turf(head_mind.current)
|
||||
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == 1) && !head_mind.is_brigged(600))
|
||||
if((head_mind) && (head_mind.current) && (head_mind.current.stat != 2) && T && (T.z == map.zMainStation) && !head_mind.is_brigged(600))
|
||||
if(ishuman(head_mind.current))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
// probably wanna export this stuff into a separate function for use by both
|
||||
// revs and heads
|
||||
//assume that only carbon mobs can become rev heads for now
|
||||
if(!rev_mind.current:handcuffed && T && T.z == 1)
|
||||
if(!rev_mind.current:handcuffed && T && T.z == map.zMainStation)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
score["disc"] = 0
|
||||
if(location in bad_zone3)
|
||||
score["disc"] = 0
|
||||
if(A.loc.z != 1)
|
||||
if(A.loc.z != map.zMainStation)
|
||||
score["disc"] = 0
|
||||
|
||||
if(score["nuked"])
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z == 2)
|
||||
if(T.z == map.zCentcomm)
|
||||
continue
|
||||
if(T.z > 6)
|
||||
continue
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/carbon/M = T.imp_in
|
||||
if(!M) continue //Changeling monkeys break the console, bad monkeys.
|
||||
if(M.z == 1 && !istype(M.loc, /turf/space))
|
||||
if(M.z == map.zMainStation && !istype(M.loc, /turf/space))
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
loc_display = mob_loc.loc
|
||||
if(T.malfunction)
|
||||
|
||||
@@ -376,7 +376,7 @@ Class Procs:
|
||||
return 1
|
||||
var/turf/T = get_turf(usr)
|
||||
if(!isAI(usr) && T.z != z)
|
||||
if(usr.z != 2)
|
||||
if(usr.z != map.zCentcomm)
|
||||
to_chat(usr, "<span class='warning'>WARNING: Unable to interface with \the [src.name].</span>")
|
||||
return 1
|
||||
if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
if(T) continue
|
||||
if(T.z == 2) continue
|
||||
if(T.z == map.zCentcomm) continue
|
||||
var/tmpname = M.real_name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
|
||||
@@ -600,7 +600,7 @@
|
||||
range = RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
|
||||
if(!action_checks(target) || src.loc.z == 2) return
|
||||
if(!action_checks(target) || src.loc.z == map.zCentcomm) return
|
||||
var/turf/T = get_turf(target)
|
||||
if(T)
|
||||
set_ready_state(0)
|
||||
@@ -620,7 +620,7 @@
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
|
||||
if(!action_checks(target) || src.loc.z == 2) return
|
||||
if(!action_checks(target) || src.loc.z == map.zCentcomm) return
|
||||
var/list/theareas = list()
|
||||
for(var/area/AR in orange(100, chassis))
|
||||
if(AR in theareas) continue
|
||||
|
||||
@@ -567,7 +567,7 @@
|
||||
I.loc = M.loc
|
||||
I.reset_plane_and_layer()
|
||||
I.dropped(M)
|
||||
I.z = 2
|
||||
I.z = map.zCentcomm
|
||||
I.y = 68
|
||||
I.x = (thunderdomefightercount % 15) + 121
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
var/locked_to_current_z = 0//To prevent the moveable atom from leaving this Z, examples are DAT DISK and derelict MoMMIs.
|
||||
|
||||
for(var/obj/item/weapon/disk/nuclear in contents_brought)
|
||||
locked_to_current_z = 1
|
||||
locked_to_current_z = map.zMainStation
|
||||
break
|
||||
|
||||
//Check if it's a mob pulling an object
|
||||
@@ -186,7 +186,7 @@
|
||||
for(var/mob/living/silicon/robot/mommi in contents_brought)
|
||||
if(mommi.locked_to_z != 0)
|
||||
if(src.z == mommi.locked_to_z)
|
||||
locked_to_current_z = 1
|
||||
locked_to_current_z = map.zMainStation
|
||||
else
|
||||
to_chat(mommi, "<span class='warning'>You find your way back.</span>")
|
||||
move_to_z = mommi.locked_to_z
|
||||
|
||||
@@ -181,7 +181,7 @@ var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-ti
|
||||
var/list/WORLD_X_OFFSET = list()
|
||||
var/list/WORLD_Y_OFFSET = list()
|
||||
|
||||
var/shuttle_z = 2 //default
|
||||
var/shuttle_z = map.zCentcomm //default
|
||||
var/airtunnel_start = 68 // default
|
||||
var/airtunnel_stop = 68 // default
|
||||
var/airtunnel_bottom = 72 // default
|
||||
|
||||
@@ -1128,7 +1128,7 @@ var/global/floorIsLava = 0
|
||||
set category = "Admin"
|
||||
set name = "Unprison"
|
||||
|
||||
if (M.z == 2)
|
||||
if (M.z == map.zCentcomm)
|
||||
if (config.allow_admin_jump)
|
||||
M.loc = pick(latejoin)
|
||||
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
|
||||
@@ -1197,7 +1197,7 @@ var/global/floorIsLava = 0
|
||||
if(3)
|
||||
var/count = 0
|
||||
for(var/mob/living/carbon/monkey/Monkey in world)
|
||||
if(Monkey.z == 1)
|
||||
if(Monkey.z == map.zMainStation)
|
||||
count++
|
||||
return "Kill all [count] of the monkeys on the station"
|
||||
if(4)
|
||||
|
||||
@@ -1779,7 +1779,7 @@
|
||||
foo += text("<B>Is an AI</B> | ")
|
||||
else
|
||||
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[];sendtomaze=\ref[]'>Maze</A> | ", src, M)
|
||||
else
|
||||
@@ -2454,7 +2454,7 @@
|
||||
feedback_add_details("admin_secrets_fun_used","DP")
|
||||
var/A = locate(/area/shuttle_prison)
|
||||
for(var/atom/movable/AM as mob|obj in A)
|
||||
AM.z = 2
|
||||
AM.z = map.zCentcomm
|
||||
AM.Move()
|
||||
*/
|
||||
message_admins("<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)
|
||||
count++
|
||||
if(!(count % 50000)) sleep(world.tick_lag)
|
||||
if(F.z == 1)
|
||||
if(F.z == map.zMainStation)
|
||||
F.name = "lava"
|
||||
F.desc = "The floor is LAVA!"
|
||||
F.overlays += image(icon = F.icon, icon_state = "lava")
|
||||
@@ -2803,7 +2803,7 @@
|
||||
sleep(10)
|
||||
|
||||
for(var/turf/simulated/floor/F in lavaturfs) // Reset everything.
|
||||
if(F.z == 1)
|
||||
if(F.z == map.zMainStation)
|
||||
F.name = initial(F.name)
|
||||
F.desc = initial(F.desc)
|
||||
F.overlays.len = 0
|
||||
@@ -2882,7 +2882,7 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
for(var/obj/machinery/door/airlock/W in all_doors)
|
||||
if(W.z == 1 && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
if(W.z == map.zMainStation && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
command_alert(/datum/command_alert/eagles)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/datum/event/alien_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
if(directory[ckey(blob.key)])
|
||||
blob_client = directory[ckey(blob.key)]
|
||||
location = get_turf(C)
|
||||
if(location.z != 1 || istype(location, /turf/space))
|
||||
if(location.z != map.zMainStation || istype(location, /turf/space))
|
||||
location = null
|
||||
C.gib()
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/datum/event/brand_intelligence/start()
|
||||
for(var/obj/machinery/vending/V in machines)
|
||||
if(V.z != 1) continue
|
||||
if(V.z != map.zMainStation) continue
|
||||
vendingMachines.Add(V)
|
||||
|
||||
if(!vendingMachines.len)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
if(T.z != map.zMainStation)
|
||||
continue
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
|
||||
@@ -301,21 +301,21 @@
|
||||
spawn(0)
|
||||
to_chat(world, "Started processing APCs")
|
||||
for (var/obj/machinery/power/apc/APC in world)
|
||||
if(APC.z == 1)
|
||||
if(APC.z == map.zMainStation)
|
||||
APC.ion_act()
|
||||
apcnum++
|
||||
to_chat(world, "Finished processing APCs. Processed: [apcnum]")
|
||||
spawn(0)
|
||||
to_chat(world, "Started processing SMES")
|
||||
for (var/obj/machinery/power/smes/SMES in world)
|
||||
if(SMES.z == 1)
|
||||
if(SMES.z == map.zMainStation)
|
||||
SMES.ion_act()
|
||||
smesnum++
|
||||
to_chat(world, "Finished processing SMES. Processed: [smesnum]")
|
||||
spawn(0)
|
||||
to_chat(world, "Started processing AIRLOCKS")
|
||||
for (var/obj/machinery/door/airlock/D in world)
|
||||
if(D.z == 1)
|
||||
if(D.z == map.zMainStation)
|
||||
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
|
||||
airlocknum++
|
||||
spawn(0)
|
||||
@@ -324,7 +324,7 @@
|
||||
spawn(0)
|
||||
to_chat(world, "Started processing FIREDOORS")
|
||||
for (var/obj/machinery/door/firedoor/D in world)
|
||||
if(D.z == 1)
|
||||
if(D.z == map.zMainStation)
|
||||
firedoornum++;
|
||||
spawn(0)
|
||||
D.ion_act()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/datum/event/money_hacker/setup()
|
||||
if(all_money_accounts.len)
|
||||
for(var/obj/machinery/account_database/DB in account_DBs)
|
||||
if( DB.z == 1 && !(DB.stat&NOPOWER) && DB.activated )
|
||||
if( DB.z == map.zMainStation && !(DB.stat&NOPOWER) && DB.activated )
|
||||
affected_db = DB
|
||||
break
|
||||
if(affected_db)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
command_alert(/datum/command_alert/radiation_storm)
|
||||
|
||||
for(var/area/A in areas)
|
||||
if(A.z != 1 || is_safe_zone(A))
|
||||
if(A.z != map.zMainStation || is_safe_zone(A))
|
||||
continue
|
||||
var/area/ma = get_area_master(A)
|
||||
ma.radiation_alert()
|
||||
@@ -50,7 +50,7 @@
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1 || is_safe_zone(T.loc))
|
||||
if(T.z != map.zMainStation || is_safe_zone(T.loc))
|
||||
continue
|
||||
|
||||
var/applied_rads = (H.apply_effect(irradiationThisBurst,IRRADIATE,0) > (irradiationThisBurst/4))
|
||||
@@ -69,7 +69,7 @@
|
||||
command_alert(/datum/command_alert/radiation_storm/end)
|
||||
|
||||
for(var/area/A in areas)
|
||||
if(A.z != 1 || is_safe_zone(A))
|
||||
if(A.z != map.zMainStation || is_safe_zone(A))
|
||||
continue
|
||||
var/area/ma = get_area_master(A)
|
||||
ma.reset_radiation_alert()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, locc)
|
||||
sparks.start()
|
||||
D.z = 2
|
||||
D.z = map.zCentcomm
|
||||
D.has_loot = 0
|
||||
|
||||
qdel(D) // Drone deletion handles removal from drones list
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/datum/event/spider_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in atmos_machines)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.loc.z == map.zMainStation && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ var/global/datum/interactive_map/camera/adv_camera = new
|
||||
continue
|
||||
if(pos.z != zz)
|
||||
camerasbyzlevel["[zz]"] -= C //bad zlevel
|
||||
if(pos.z == 1 || pos.z == 5)
|
||||
if(pos.z == map.zMainStation || pos.z == map.zAsteroid)
|
||||
camerasbyzlevel["[zz]"] |= C //try to fix the zlevel list.
|
||||
continue
|
||||
ID="\ref[C]"
|
||||
@@ -149,7 +149,7 @@ var/global/datum/interactive_map/camera/adv_camera = new
|
||||
var/turf/pos = get_turf(single)
|
||||
if(pos.z != zz)
|
||||
camerasbyzlevel["[zz]"] -= single //bad zlevel
|
||||
if(pos.z == 1 || pos.z == 5)
|
||||
if(pos.z == map.zMainStation || pos.z == map.zAsteroid)
|
||||
camerasbyzlevel["[zz]"] |= single //try to fix the zlevel list
|
||||
else adding = 2 //Set to remove
|
||||
ID="\ref[single]"
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/notify_admins = 0
|
||||
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel
|
||||
if(z != map.zAsteroid)//Only annoy the admins ingame if we're triggered off the mining zlevel
|
||||
notify_admins = 1
|
||||
if(notify_admins)
|
||||
if(triggered_by_explosive)
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/notify_admins = 0
|
||||
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel
|
||||
if(z != map.zAsteroid)//Only annoy the admins ingame if we're triggered off the mining zlevel
|
||||
notify_admins = 1
|
||||
if(notify_admins)
|
||||
if(triggered_by_explosive)
|
||||
|
||||
@@ -993,7 +993,7 @@
|
||||
return 0
|
||||
if((temp_turf.z != our_turf.z) || M.stat!=CONSCIOUS) //Not on the same zlevel as us or they're dead.
|
||||
// to_chat(world, "[(temp_turf.z != our_turf.z) ? "not on the same zlevel as [M]" : "[M] is not concious"]")
|
||||
if(temp_turf.z != 2)
|
||||
if(temp_turf.z != map.zCentcomm)
|
||||
to_chat(src, "The mind of [M] is too faint...")//Prevent "The mind of Admin is too faint..."
|
||||
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
//Not on the station or mining?
|
||||
var/turf/temp_turf = get_turf(remoteview_target)
|
||||
|
||||
if(temp_turf && (temp_turf.z != 1 && temp_turf.z != 5) || remoteview_target.stat!=CONSCIOUS)
|
||||
if(temp_turf && (temp_turf.z != map.zMainStation && temp_turf.z != map.zAsteroid) || remoteview_target.stat!=CONSCIOUS)
|
||||
to_chat(src, "<span class='warning'>Your psy-connection grows too faint to maintain!</span>")
|
||||
isRemoteObserve = 0
|
||||
if(!isRemoteObserve && client && !client.adminobs && !isTeleViewing(client.eye))
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
var/callshuttle = 0
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in machines)
|
||||
if(commconsole.z == 2)
|
||||
if(commconsole.z == map.zCentcomm)
|
||||
continue
|
||||
if(istype(commconsole.loc,/turf))
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
|
||||
if(commboard.z == 2)
|
||||
if(commboard.z == map.zCentcomm)
|
||||
continue
|
||||
if(istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage))
|
||||
break
|
||||
callshuttle++
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in player_list)
|
||||
if(shuttlecaller.z == 2)
|
||||
if(shuttlecaller.z == map.zCentcomm)
|
||||
continue
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
break
|
||||
|
||||
@@ -508,10 +508,11 @@ nanoui is used to open and update nano browser uis
|
||||
map_update = 1
|
||||
|
||||
if(href_list["zlevel"])
|
||||
var/newz = input("Choose Z-Level to view.","Z-Levels",1) as null|anything in list(1,3,4,5,6)
|
||||
var/listed_zlevels = list(map.zMainStation, map.zTCommSat, map.zDerelict, map.zAsteroid, map.zDeepSpace)
|
||||
var/newz = input("Choose Z-Level to view.","Z-Levels",1) as null|anything in listed_zlevels
|
||||
if(!newz || isnull(newz))
|
||||
return 0
|
||||
if(newz < 1 || newz > 6 || newz == 2)
|
||||
if(!(newz in listed_zlevels))
|
||||
to_chat(usr, "<span class='danger'>Unable to establish a connection</span>")
|
||||
return 0
|
||||
if(newz != map_z_level)
|
||||
@@ -546,4 +547,3 @@ nanoui is used to open and update nano browser uis
|
||||
*/
|
||||
/datum/nanoui/proc/update(var/force_open = 0)
|
||||
src_object.ui_interact(user, ui_key, src, force_open)
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ var/global/list/battery_online = list(
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/battery/proc/ion_act()
|
||||
if(src.z == 1)
|
||||
if(src.z == map.zMainStation)
|
||||
if(prob(1)) //explosion
|
||||
message_admins("<span class='warning'>SMES explosion in [get_area(src)]</span>")
|
||||
src.visible_message("<span class='warning'>\The [src] is making strange noises!</span>",
|
||||
|
||||
Reference in New Issue
Block a user