Removes most hard-coded z level checks

This commit is contained in:
Crazylemon64
2016-07-31 21:29:03 -07:00
parent f54de64a73
commit bf2bcbce67
122 changed files with 325 additions and 410 deletions
+3 -6
View File
@@ -1979,8 +1979,7 @@
return
else
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
// TODO: Tie into space manager
if((F.z in config.station_levels))
if(is_station_level(F.z))
spawn(0)
if(!F.receivefax(P))
to_chat(src.owner, "\red Message transmission to [F.department] failed.")
@@ -2327,8 +2326,7 @@
for(var/mob/living/carbon/human/H in mob_list)
var/turf/loc = find_loc(H)
var/security = 0
// TODO: Tie into space manager
if(!(loc.z in config.station_levels) || prisonwarped.Find(H))
if(!is_station_level(loc.z) || prisonwarped.Find(H))
//don't warp them if they aren't ready or are already there
continue
@@ -2565,8 +2563,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)
// TODO: Tie into space manager
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))
if(is_station_level(W.z) && !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')
+1 -2
View File
@@ -373,8 +373,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/I in singularities)
var/obj/singularity/S = I
// TODO: Tie into space manager
if(S.z == ZLEVEL_CENTCOMM || S.z >= MAX_Z)
if(!is_level_reachable(S.z))
continue
qdel(S)
log_admin("[key_name(src)] has deleted all Singularities and Tesla orbs.")
+1 -2
View File
@@ -81,8 +81,7 @@ var/list/sounds_cache = list()
for(var/O in global_intercoms)
var/obj/item/device/radio/intercom/I = O
// TODO: Tie into space manager
if(I.z != ZLEVEL_STATION && !ignore_z)
if(is_station_level(I.z) && !ignore_z)
continue
if(!I.on && !ignore_power)
continue