Replace explicit z-level checks with defines

This commit is contained in:
Tad Hardesty
2017-12-29 11:40:06 -08:00
committed by CitadelStationBot
parent 48e0c47410
commit 0418ee4df6
96 changed files with 268 additions and 145 deletions
+1 -1
View File
@@ -606,7 +606,7 @@
/datum/admins/proc/unprison(mob/M in GLOB.mob_list)
set category = "Admin"
set name = "Unprison"
if (M.z == ZLEVEL_CENTCOM)
if (is_centcom_level(M.z))
SSjob.SendToLateJoin(M)
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
+1 -1
View File
@@ -360,7 +360,7 @@
if(isdrone(M))
drones++
continue
if(M.z == ZLEVEL_CENTCOM)
if(is_centcom_level(M.z))
living_skipped++
continue
living_players++
+1 -1
View File
@@ -445,7 +445,7 @@
return
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Egalitarian Station")
for(var/obj/machinery/door/airlock/W in GLOB.machines)
if((W.z in GLOB.station_z_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
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")
priority_announce("CentCom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/ai/commandreport.ogg')
+1 -1
View File
@@ -521,7 +521,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
for(var/area/A in world)
if(on_station)
var/turf/picked = safepick(get_area_turfs(A.type))
if(picked && (picked.z in GLOB.station_z_levels))
if(picked && is_station_level(picked.z))
if(!(A.type in areas_all) && !is_type_in_typecache(A, station_areas_blacklist))
areas_all.Add(A.type)
else if(!(A.type in areas_all))
+1 -1
View File
@@ -35,7 +35,7 @@
return FALSE
if(onstation)
var/turf/T = get_turf(applicant)
if(!(T.z in GLOB.station_z_levels))
if(!is_station_level(T.z))
return FALSE
if(conscious && applicant.stat) //incase you don't care about a certain antag being unconcious when made, ie if they have selfhealing abilities.
return FALSE