Replace explicit z-level checks with defines
This commit is contained in:
committed by
CitadelStationBot
parent
48e0c47410
commit
0418ee4df6
@@ -76,7 +76,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
if(GLOB.teleportlocs[AR.name])
|
||||
continue
|
||||
var/turf/picked = safepick(get_area_turfs(AR.type))
|
||||
if (picked && (picked.z in GLOB.station_z_levels))
|
||||
if (picked && is_station_level(picked.z))
|
||||
GLOB.teleportlocs[AR.name] = AR
|
||||
|
||||
sortTim(GLOB.teleportlocs, /proc/cmp_text_dsc)
|
||||
|
||||
+8
-8
@@ -113,7 +113,7 @@
|
||||
if(!T)
|
||||
return FALSE
|
||||
|
||||
if(T.z == ZLEVEL_TRANSIT)
|
||||
if(is_transit_level(T.z))
|
||||
for(var/A in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = A
|
||||
if(M.launch_status == ENDGAME_TRANSIT)
|
||||
@@ -122,7 +122,7 @@
|
||||
if(T in shuttle_area)
|
||||
return TRUE
|
||||
|
||||
if(T.z != ZLEVEL_CENTCOM)//if not, don't bother
|
||||
if(!is_centcom_level(T.z))//if not, don't bother
|
||||
return FALSE
|
||||
|
||||
//Check for centcom itself
|
||||
@@ -141,15 +141,15 @@
|
||||
/atom/proc/onSyndieBase()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(T.z != ZLEVEL_CENTCOM)//if not, don't bother
|
||||
return 0
|
||||
if(!is_centcom_level(T.z))//if not, don't bother
|
||||
return FALSE
|
||||
|
||||
if(istype(T.loc, /area/shuttle/syndicate) || istype(T.loc, /area/syndicate_mothership))
|
||||
return 1
|
||||
if(istype(T.loc, /area/shuttle/syndicate) || istype(T.loc, /area/syndicate_mothership) || istype(T.loc, /area/shuttle/assault_pod))
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
|
||||
SendSignal(COMSIG_ATOM_HULK_ATTACK, user)
|
||||
|
||||
@@ -611,8 +611,8 @@
|
||||
|
||||
/atom/movable/proc/in_bounds()
|
||||
. = FALSE
|
||||
var/turf/currentturf = get_turf(src)
|
||||
if(currentturf && (currentturf.z == ZLEVEL_CENTCOM || (currentturf.z in GLOB.station_z_levels) || currentturf.z == ZLEVEL_TRANSIT))
|
||||
var/turf/T = get_turf(src)
|
||||
if (T && (is_centcom_level(T.z) || is_station_level(T.z) || is_transit_level(T.z)))
|
||||
. = TRUE
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
if(!user.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE))
|
||||
to_chat(user, "<span class='danger'>AUTHENTICATION FAILURE. ACCESS DENIED.</span>")
|
||||
return FALSE
|
||||
if(user.z != ZLEVEL_CENTCOM)
|
||||
if(!user.onSyndieBase())
|
||||
to_chat(user, "<span class='warning'>[src] is out of range! It can only be used at your base!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
|
||||
/obj/item/antag_spawner/slaughter_demon/attack_self(mob/user)
|
||||
if(!(user.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(user.z))
|
||||
to_chat(user, "<span class='notice'>You should probably wait until you reach the station.</span>")
|
||||
return
|
||||
if(used)
|
||||
|
||||
@@ -53,7 +53,18 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
|
||||
<<<<<<< HEAD
|
||||
.= ..()
|
||||
=======
|
||||
/mob/camera/blob/proc/validate_location()
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(T)
|
||||
if(((A && !A.blob_allowed) || !T || !is_station_level(T.z)) && LAZYLEN(GLOB.blobstart))
|
||||
T = get_turf(pick(GLOB.blobstart))
|
||||
if(!T)
|
||||
CRASH("No blobspawnpoints and blob spawned in nullspace.")
|
||||
forceMove(T)
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
|
||||
/mob/camera/blob/Life()
|
||||
if(!blob_core)
|
||||
@@ -73,6 +84,12 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
max_blob_points = INFINITY
|
||||
blob_points = INFINITY
|
||||
addtimer(CALLBACK(src, .proc/victory), 450)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
if(!victory_in_progress && max_count < blobs_legit.len)
|
||||
max_count = blobs_legit.len
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
..()
|
||||
|
||||
|
||||
@@ -82,7 +99,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
for(var/i in GLOB.mob_living_list)
|
||||
var/mob/living/L = i
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T || !(T.z in GLOB.station_z_levels))
|
||||
if(!T || !is_station_level(T.z))
|
||||
continue
|
||||
|
||||
if(L in GLOB.overminds || (L.pass_flags & PASSBLOB))
|
||||
|
||||
@@ -165,13 +165,13 @@
|
||||
var/list/teleportnames = list()
|
||||
|
||||
for(var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/O in GLOB.all_clockwork_objects)
|
||||
if(!O.Adjacent(invoker) && O != src && (O.z <= ZLEVEL_SPACEMAX) && O.anchored) //don't list obelisks that we're next to
|
||||
if(!O.Adjacent(invoker) && O != src && !is_away_level(O.z) && O.anchored) //don't list obelisks that we're next to
|
||||
var/area/A = get_area(O)
|
||||
var/locname = initial(A.name)
|
||||
possible_targets[avoid_assoc_duplicate_keys("[locname] [O.name]", teleportnames)] = O
|
||||
|
||||
for(var/mob/living/L in GLOB.alive_mob_list)
|
||||
if(!L.stat && is_servant_of_ratvar(L) && !L.Adjacent(invoker) && (L.z <= ZLEVEL_SPACEMAX)) //People right next to the invoker can't be portaled to, for obvious reasons
|
||||
if(!L.stat && is_servant_of_ratvar(L) && !L.Adjacent(invoker) && !is_away_level(L.z)) //People right next to the invoker can't be portaled to, for obvious reasons
|
||||
possible_targets[avoid_assoc_duplicate_keys("[L.name] ([L.real_name])", teleportnames)] = L
|
||||
|
||||
if(!possible_targets.len)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
fabrication_values["power_cost"] = 0
|
||||
|
||||
var/turf/Y = get_turf(user)
|
||||
if(!Y || (!(Y.z in GLOB.station_z_levels) && Y.z != ZLEVEL_CENTCOM && Y.z != ZLEVEL_MINING && Y.z != ZLEVEL_LAVALAND))
|
||||
if(!Y || (!is_centcom_level(Y.z) && !is_station_level(Y.z) && !is_mining_level(Y.z)))
|
||||
fabrication_values["operation_time"] *= 2
|
||||
if(fabrication_values["power_cost"] > 0)
|
||||
fabrication_values["power_cost"] *= 2
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
hierophant_message("<span class='large_brass'><b>The Eminence:</b> \"[message]\"</span>")
|
||||
|
||||
/mob/camera/eminence/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
if(z == ZLEVEL_CITYOFCOGS || is_servant_of_ratvar(speaker) || GLOB.ratvar_approaches || GLOB.ratvar_awakens) //Away from Reebe, the Eminence can't hear anything
|
||||
if(is_reebe(z) || is_servant_of_ratvar(speaker) || GLOB.ratvar_approaches || GLOB.ratvar_awakens) //Away from Reebe, the Eminence can't hear anything
|
||||
to_chat(src, message)
|
||||
return
|
||||
to_chat(src, "<i>[speaker] says something, but you can't understand any of it...</i>")
|
||||
@@ -233,7 +233,7 @@
|
||||
button_icon_state = "warp_down"
|
||||
|
||||
/datum/action/innate/eminence/station_jump/Activate()
|
||||
if(owner.z == ZLEVEL_CITYOFCOGS)
|
||||
if(is_reebe(owner.z))
|
||||
owner.forceMove(get_turf(pick(GLOB.generic_event_spawns)))
|
||||
owner.playsound_local(owner, 'sound/magic/magic_missile.ogg', 50, TRUE)
|
||||
flash_color(owner, flash_color = "#AF0AAF", flash_time = 25)
|
||||
|
||||
@@ -126,7 +126,7 @@ Applications: 8 servants, 3 caches, and 100 CV
|
||||
|
||||
/datum/clockwork_scripture/proc/check_offstation_penalty()
|
||||
var/turf/T = get_turf(invoker)
|
||||
if(!T || (!(T.z in GLOB.station_z_levels) && T.z != ZLEVEL_CENTCOM && T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND && T.z != ZLEVEL_CITYOFCOGS))
|
||||
if(!T || (!is_centcom_level(T.z) && !is_station_level(T.z) && !is_mining_level(T.z) && !is_reebe(T.z)))
|
||||
channel_time *= 2
|
||||
power_cost *= 2
|
||||
return TRUE
|
||||
@@ -262,7 +262,7 @@ Applications: 8 servants, 3 caches, and 100 CV
|
||||
to_chat(invoker, "<span class='warning'>There are too many constructs of this type ([constructs])! You may only have [round(construct_limit)] at once.</span>")
|
||||
return
|
||||
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
|
||||
if(G && !G.active && combat_construct && invoker.z == ZLEVEL_CITYOFCOGS && !confirmed) //Putting marauders on the base during the prep phase is a bad idea mmkay
|
||||
if(G && !G.active && combat_construct && is_reebe(invoker.z) && !confirmed) //Putting marauders on the base during the prep phase is a bad idea mmkay
|
||||
if(alert(invoker, "This is a combat construct, and you cannot easily get it to the station. Are you sure you want to make one here?", "Construct Alert", "Yes", "Cancel") == "Cancel")
|
||||
return
|
||||
if(!is_servant_of_ratvar(invoker) || !invoker.canUseTopic(slab))
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
quickbind_desc = "Returns you to Reebe."
|
||||
|
||||
/datum/clockwork_scripture/abscond/check_special_requirements()
|
||||
if(invoker.z == ZLEVEL_CITYOFCOGS)
|
||||
if(is_reebe(invoker.z))
|
||||
to_chat(invoker, "<span class='danger'>You're already at Reebe.</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
@@ -203,7 +203,7 @@ This file contains the arcane tome files.
|
||||
A = get_area(src)
|
||||
if(!src || QDELETED(src) || !Adjacent(user) || user.incapacitated() || !check_rune_turf(Turf, user))
|
||||
return
|
||||
|
||||
|
||||
//AAAAAAAAAAAAAAAH, i'm rewriting enough for now so TODO: remove this shit
|
||||
if(ispath(rune_to_scribe, /obj/effect/rune/narsie))
|
||||
if(!summon_objective)
|
||||
@@ -266,7 +266,11 @@ This file contains the arcane tome files.
|
||||
to_chat(user, "<span class='cult'>There is already a rune here.</span>")
|
||||
return FALSE
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(!(T.z in GLOB.station_z_levels) && T.z != ZLEVEL_MINING)
|
||||
=======
|
||||
if(!is_station_level(T.z) && !is_mining_level(T.z))
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -268,7 +268,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
var/list/teleportnames = list()
|
||||
for(var/R in GLOB.teleport_runes)
|
||||
var/obj/effect/rune/teleport/T = R
|
||||
if(T != src && (T.z <= ZLEVEL_SPACEMAX))
|
||||
if(T != src && !is_away_level(T.z))
|
||||
potential_runes[avoid_assoc_duplicate_keys(T.listkey, teleportnames)] = T
|
||||
|
||||
if(!potential_runes.len)
|
||||
@@ -277,8 +277,14 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
fail_invoke()
|
||||
return
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(user.z > ZLEVEL_SPACEMAX)
|
||||
to_chat(user, "<span class='cultitalic'>You are not in the right dimension!</span>")
|
||||
=======
|
||||
var/turf/T = get_turf(src)
|
||||
if(is_away_level(T.z))
|
||||
to_chat(user, "<span class='cult italic'>You are not in the right dimension!</span>")
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
log_game("Teleport rune failed - user in away mission")
|
||||
fail_invoke()
|
||||
return
|
||||
@@ -289,7 +295,6 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
fail_invoke()
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/target = get_turf(actual_selected_rune)
|
||||
if(is_blocked_turf(target, TRUE))
|
||||
to_chat(user, "<span class='warning'>The target rune is blocked. Attempting to teleport to it would be massively unwise.</span>")
|
||||
@@ -479,7 +484,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
/obj/effect/rune/narsie/invoke(var/list/invokers)
|
||||
if(used)
|
||||
return
|
||||
if(!(z in GLOB.station_z_levels))
|
||||
if(!is_station_level(z))
|
||||
return
|
||||
|
||||
if(locate(/obj/singularity/narsie) in GLOB.poi_list)
|
||||
@@ -815,8 +820,13 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
fail_invoke()
|
||||
log_game("Summon Cultist rune failed - target was deconverted")
|
||||
return
|
||||
<<<<<<< HEAD
|
||||
if(cultist_to_summon.z > ZLEVEL_SPACEMAX)
|
||||
to_chat(user, "<span class='cultitalic'>[cultist_to_summon] is not in our dimension!</span>")
|
||||
=======
|
||||
if(is_away_level(cultist_to_summon.z))
|
||||
to_chat(user, "<span class='cult italic'>[cultist_to_summon] is not in our dimension!</span>")
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
fail_invoke()
|
||||
log_game("Summon Cultist rune failed - target in away mission")
|
||||
return
|
||||
|
||||
@@ -65,8 +65,13 @@
|
||||
log_game("Teleport talisman failed - no other teleport runes")
|
||||
return ..(user, 0)
|
||||
|
||||
<<<<<<< HEAD
|
||||
if(user.z > ZLEVEL_SPACEMAX)
|
||||
to_chat(user, "<span class='cultitalic'>You are not in the right dimension!</span>")
|
||||
=======
|
||||
if(is_away_level(user.z))
|
||||
to_chat(user, "<span class='cult italic'>You are not in the right dimension!</span>")
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
log_game("Teleport talisman failed - user in away mission")
|
||||
return ..(user, 0)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/proc/power_failure()
|
||||
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/ai/poweroff.ogg')
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(istype(get_area(S), /area/ai_monitored/turret_protected) || !(S.z in GLOB.station_z_levels))
|
||||
if(istype(get_area(S), /area/ai_monitored/turret_protected) || !is_station_level(S.z))
|
||||
continue
|
||||
S.charge = 0
|
||||
S.output_level = 0
|
||||
@@ -22,7 +22,7 @@
|
||||
break
|
||||
if(A.contents)
|
||||
for(var/atom/AT in A.contents)
|
||||
if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough.
|
||||
if(!is_station_level(AT.z)) //Only check one, it's enough.
|
||||
skip = 1
|
||||
break
|
||||
if(skip)
|
||||
@@ -33,7 +33,7 @@
|
||||
A.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs_list)
|
||||
if(C.cell && (C.z in GLOB.station_z_levels))
|
||||
if(C.cell && is_station_level(C.z))
|
||||
var/area/A = C.area
|
||||
|
||||
var/skip = 0
|
||||
@@ -50,11 +50,11 @@
|
||||
|
||||
priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in GLOB.machines)
|
||||
if(C.cell && (C.z in GLOB.station_z_levels))
|
||||
if(C.cell && is_station_level(C.z))
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
C.failure_timer = 0
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(!(S.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(S.z))
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output_level = S.output_level_max
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in GLOB.machines)
|
||||
if(!(S.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(S.z))
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output_level = S.output_level_max
|
||||
|
||||
@@ -233,7 +233,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/nuke_station/Activate()
|
||||
var/turf/T = get_turf(owner)
|
||||
if(!istype(T) || !(T.z in GLOB.station_z_levels))
|
||||
if(!istype(T) || !is_station_level(T.z))
|
||||
to_chat(owner, "<span class='warning'>You cannot activate the doomsday device while off-station!</span>")
|
||||
return
|
||||
if(alert(owner, "Send arming signal? (true = arm, false = cancel)", "purge_all_life()", "confirm = TRUE;", "confirm = FALSE;") != "confirm = TRUE;")
|
||||
@@ -356,7 +356,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/obj/machinery/doomsday_device/process()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T || !(T.z in GLOB.station_z_levels))
|
||||
if(!T || !is_station_level(T.z))
|
||||
minor_announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", TRUE)
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
qdel(src)
|
||||
@@ -378,7 +378,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
for(var/i in GLOB.mob_living_list)
|
||||
var/mob/living/L = i
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T || !(T.z in GLOB.station_z_levels))
|
||||
if(!T || !is_station_level(T.z))
|
||||
continue
|
||||
if(issilicon(L))
|
||||
continue
|
||||
@@ -425,7 +425,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/lockdown/Activate()
|
||||
for(var/obj/machinery/door/D in GLOB.airlocks)
|
||||
if(!(D.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(D.z))
|
||||
continue
|
||||
INVOKE_ASYNC(D, /obj/machinery/door.proc/hostile_lockdown, owner)
|
||||
addtimer(CALLBACK(D, /obj/machinery/door.proc/disable_lockdown), 900)
|
||||
@@ -503,7 +503,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/break_fire_alarms/Activate()
|
||||
for(var/obj/machinery/firealarm/F in GLOB.machines)
|
||||
if(!(F.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(F.z))
|
||||
continue
|
||||
F.emagged = TRUE
|
||||
to_chat(owner, "<span class='notice'>All thermal sensors on the station have been disabled. Fire alerts will no longer be recognized.</span>")
|
||||
@@ -530,7 +530,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/break_air_alarms/Activate()
|
||||
for(var/obj/machinery/airalarm/AA in GLOB.machines)
|
||||
if(!(AA.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(AA.z))
|
||||
continue
|
||||
AA.emagged = TRUE
|
||||
to_chat(owner, "<span class='notice'>All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.</span>")
|
||||
@@ -753,7 +753,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list(
|
||||
|
||||
/datum/action/innate/ai/emergency_lights/Activate()
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
if(L.z in GLOB.station_z_levels)
|
||||
if(is_station_level(L.z))
|
||||
L.no_emergency = TRUE
|
||||
INVOKE_ASYNC(L, /obj/machinery/light/.proc/update, FALSE)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
if(target == src)
|
||||
return
|
||||
|
||||
if(!(z in GLOB.station_z_levels) && z != ZLEVEL_LAVALAND)
|
||||
if(!is_station_level(z) && !is_mining_level(z))
|
||||
to_chat(src, "<span class='warning'>Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
var/datum/disease/D = new /datum/disease/transformation/jungle_fever() //ugly but unfortunately needed
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(!(H.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(H.z))
|
||||
continue
|
||||
if(H.mind && H.client && H.stat != DEAD)
|
||||
if(H.HasDisease(D))
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if(GLOB.player_list.len < CHALLENGE_MIN_PLAYERS)
|
||||
to_chat(user, "The enemy crew is too small to be worth declaring war on.")
|
||||
return FALSE
|
||||
if(user.z != ZLEVEL_CENTCOM)
|
||||
if(!user.onSyndieBase())
|
||||
to_chat(user, "You have to be at your base to use this.")
|
||||
return FALSE
|
||||
if(world.time-SSticker.round_start_time > CHALLENGE_TIME_LIMIT)
|
||||
|
||||
@@ -451,12 +451,12 @@
|
||||
var/off_station = 0
|
||||
var/turf/bomb_location = get_turf(src)
|
||||
var/area/A = get_area(bomb_location)
|
||||
if(bomb_location && (bomb_location.z in GLOB.station_z_levels))
|
||||
if(bomb_location && is_station_level(bomb_location.z))
|
||||
if(istype(A, /area/space))
|
||||
off_station = NUKE_NEAR_MISS
|
||||
if((bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)))
|
||||
off_station = NUKE_NEAR_MISS
|
||||
else if((istype(A, /area/syndicate_mothership) || (istype(A, /area/shuttle/syndicate)) && bomb_location.z == ZLEVEL_CENTCOM))
|
||||
else if(bomb_location.onSyndieBase())
|
||||
off_station = NUKE_SYNDICATE_BASE
|
||||
else
|
||||
off_station = NUKE_MISS_STATION
|
||||
@@ -556,7 +556,7 @@ This is here to make the tiles around the station mininuke change when it's arme
|
||||
addtimer(CALLBACK(user, /atom/proc/add_atom_colour, (i % 2)? "#00FF00" : "#FF0000", ADMIN_COLOUR_PRIORITY), i)
|
||||
addtimer(CALLBACK(src, .proc/manual_suicide, user), 101)
|
||||
return MANUAL_SUICIDE
|
||||
|
||||
|
||||
/obj/item/disk/proc/manual_suicide(mob/living/user)
|
||||
user.remove_atom_colour(ADMIN_COLOUR_PRIORITY)
|
||||
user.visible_message("<span class='suicide'>[user] was destroyed by the nuclear blast!</span>")
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
if(!target || !considered_alive(target) || considered_afk(target))
|
||||
return TRUE
|
||||
var/turf/T = get_turf(target.current)
|
||||
return T && !(T.z in GLOB.station_z_levels)
|
||||
return T && !is_station_level(T.z)
|
||||
|
||||
/datum/objective/mutiny/update_explanation_text()
|
||||
..()
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
/datum/game_mode/revolution/proc/check_heads_victory()
|
||||
for(var/datum/mind/rev_mind in revolution.head_revolutionaries())
|
||||
var/turf/T = get_turf(rev_mind.current)
|
||||
if(!considered_afk(rev_mind) && considered_alive(rev_mind) && (T.z in GLOB.station_z_levels))
|
||||
if(!considered_afk(rev_mind) && considered_alive(rev_mind) && is_station_level(T.z))
|
||||
if(ishuman(rev_mind.current))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
LAZYADD(myarea.cameras, src)
|
||||
proximity_monitor = new(src, 1)
|
||||
|
||||
if(mapload && (z in GLOB.station_z_levels) && prob(3) && !start_active)
|
||||
if(mapload && is_station_level(z) && prob(3) && !start_active)
|
||||
toggle_cam()
|
||||
|
||||
/obj/machinery/camera/Destroy()
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
/obj/machinery/computer/security/proc/get_available_cameras()
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if((z > ZLEVEL_SPACEMAX || C.z > ZLEVEL_SPACEMAX) && (C.z != z))//if on away mission, can only recieve feed from same z_level cameras
|
||||
if((is_away_level(z) || is_away_level(C.z)) && (C.z != z))//if on away mission, can only recieve feed from same z_level cameras
|
||||
continue
|
||||
L.Add(C)
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
var/mob/camera/aiEye/remote/remote_eye = user.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/ratvar/R = target
|
||||
var/turf/T = get_turf(remote_eye)
|
||||
if(user.z != ZLEVEL_CITYOFCOGS || !(T.z in GLOB.station_z_levels))
|
||||
if(!is_reebe(user.z) || !is_station_level(T.z))
|
||||
return
|
||||
if(isclosedturf(T))
|
||||
to_chat(user, "<span class='sevtug_small'>You can't teleport into a wall.</span>")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/authenticated = 0
|
||||
var/auth_id = "Unknown" //Who is currently logged in?
|
||||
var/list/datum/comm_message/messages = list()
|
||||
var/datum/comm_message/currmsg
|
||||
var/datum/comm_message/currmsg
|
||||
var/datum/comm_message/aicurrmsg
|
||||
var/state = STATE_DEFAULT
|
||||
var/aistate = STATE_DEFAULT
|
||||
@@ -53,7 +53,7 @@
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!(z in GLOB.station_z_levels) && z != ZLEVEL_CENTCOM) //Can only use on centcom and SS13
|
||||
if(!is_station_level(z) && !is_centcom_level(z)) //Can only use on centcom and SS13
|
||||
to_chat(usr, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
@@ -136,7 +136,12 @@
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
return
|
||||
<<<<<<< HEAD
|
||||
var/input = stripped_multiline_input(usr, "Please choose a message to transmit to an allied station. Please be aware that this process is very expensive, and abuse will lead to... termination.", "Send a message to an allied station.", "")
|
||||
=======
|
||||
|
||||
var/input = stripped_multiline_input(usr, "Please choose a message to transmit to allied stations. Please be aware that this process is very expensive, and abuse will lead to... termination.", "Send a message to an allied station.", "")
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/M = T.imp_in
|
||||
if((Tr.z in GLOB.station_z_levels) && !isspaceturf(M.loc))
|
||||
if(is_station_level(Tr.z) && !isspaceturf(M.loc))
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
loc_display = mob_loc.loc
|
||||
|
||||
|
||||
@@ -209,4 +209,19 @@
|
||||
trg.teleporter_hub.update_icon()
|
||||
if(trg.teleporter_console)
|
||||
trg.teleporter_console.stat &= ~NOPOWER
|
||||
trg.teleporter_console.update_icon()
|
||||
<<<<<<< HEAD
|
||||
trg.teleporter_console.update_icon()
|
||||
=======
|
||||
trg.teleporter_console.update_icon()
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/is_eligible(atom/movable/AM)
|
||||
var/turf/T = get_turf(AM)
|
||||
if(!T)
|
||||
return FALSE
|
||||
if(is_centcom_level(T.z) || is_away_level(T.z))
|
||||
return FALSE
|
||||
var/area/A = get_area(T)
|
||||
if(!A || A.noteleport)
|
||||
return FALSE
|
||||
return TRUE
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(src.z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
add_overlay("overlay_[GLOB.security_level]")
|
||||
else
|
||||
add_overlay("overlay_[SEC_LEVEL_GREEN]")
|
||||
@@ -124,7 +124,7 @@
|
||||
var/list/data = list()
|
||||
data["emagged"] = emagged
|
||||
|
||||
if(src.z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
data["seclevel"] = get_security_level()
|
||||
else
|
||||
data["seclevel"] = "green"
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
var/line1
|
||||
var/line2
|
||||
if(SSshuttle.supply.mode == SHUTTLE_IDLE)
|
||||
if(SSshuttle.supply.z in GLOB.station_z_levels)
|
||||
if(is_station_level(SSshuttle.supply.z))
|
||||
line1 = "CARGO"
|
||||
line2 = "Docked"
|
||||
else
|
||||
@@ -140,7 +140,7 @@
|
||||
var/obj/docking_port/mobile/shuttle = SSshuttle.supply
|
||||
var/shuttleMsg = null
|
||||
if (shuttle.mode == SHUTTLE_IDLE)
|
||||
if (shuttle.z in GLOB.station_z_levels)
|
||||
if (is_station_level(shuttle.z))
|
||||
shuttleMsg = "Docked"
|
||||
else
|
||||
shuttleMsg = "[shuttle.getModeStr()]: [shuttle.getTimerStr()]"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
return power_station
|
||||
|
||||
/obj/machinery/teleport/hub/CollidedWith(atom/movable/AM)
|
||||
if(z == ZLEVEL_CENTCOM)
|
||||
if(is_centcom_level(z))
|
||||
to_chat(AM, "You can't use this here.")
|
||||
return
|
||||
if(is_ready())
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
range = RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
|
||||
if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM)
|
||||
if(!action_checks(target) || is_centcom_level(loc.z))
|
||||
return
|
||||
var/turf/T = get_turf(target)
|
||||
if(T)
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
|
||||
if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM)
|
||||
if(!action_checks(target) || is_centcom_level(loc.z))
|
||||
return
|
||||
var/list/theareas = get_areas_in_range(100, chassis)
|
||||
if(!theareas.len)
|
||||
|
||||
@@ -430,14 +430,14 @@ Code:
|
||||
switch(SSshuttle.supply.mode)
|
||||
if(SHUTTLE_CALL)
|
||||
menu += "Moving to "
|
||||
if(!(SSshuttle.supply.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(SSshuttle.supply.z))
|
||||
menu += "station"
|
||||
else
|
||||
menu += "centcom"
|
||||
menu += " ([SSshuttle.supply.timeLeft(600)] Mins)"
|
||||
else
|
||||
menu += "At "
|
||||
if(!(SSshuttle.supply.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(SSshuttle.supply.z))
|
||||
menu += "centcom"
|
||||
else
|
||||
menu += "station"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
/obj/item/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/living/user)
|
||||
if((istype(W, /obj/item/storage/backpack/holding) || count_by_type(W.GetAllContents(), /obj/item/storage/backpack/holding)))
|
||||
var/turf/loccheck = get_turf(src)
|
||||
if(loccheck.z == ZLEVEL_CITYOFCOGS)
|
||||
if(is_reebe(loccheck.z))
|
||||
user.visible_message("<span class='warning'>An unseen force knocks [user] to the ground!</span>", "<span class='big_brass'>\"I think not!\"</span>")
|
||||
user.Knockdown(60)
|
||||
return
|
||||
|
||||
@@ -52,7 +52,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 == ZLEVEL_CENTCOM)//If turf was not found or they're on CentCom
|
||||
if(!current_location || is_centcom_level(current_location.z))//If turf was not found or they're on CentCom
|
||||
to_chat(usr, "[src] is malfunctioning.")
|
||||
return
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
|
||||
@@ -167,7 +167,7 @@ Frequency:
|
||||
/obj/item/hand_tele/attack_self(mob/user)
|
||||
var/turf/current_location = get_turf(user)//What turf is the user on?
|
||||
var/area/current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
var/list/L = list( )
|
||||
@@ -205,7 +205,7 @@ Frequency:
|
||||
return
|
||||
current_location = get_turf(user) //Recheck.
|
||||
current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
user.show_message("<span class='notice'>Locked In.</span>", 2)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
canSmoothWith += /turf/open/indestructible/clock_spawn_room //list overrides are a terrible thing
|
||||
. = ..()
|
||||
ratvar_act()
|
||||
if(z == ZLEVEL_CITYOFCOGS)
|
||||
if(is_reebe(z))
|
||||
resistance_flags |= INDESTRUCTIBLE
|
||||
|
||||
/obj/structure/lattice/clockwork/ratvar_act()
|
||||
@@ -120,7 +120,7 @@
|
||||
if(!mapload)
|
||||
new /obj/effect/temp_visual/ratvar/floor/catwalk(loc)
|
||||
new /obj/effect/temp_visual/ratvar/beam/catwalk(loc)
|
||||
if(z == ZLEVEL_CITYOFCOGS)
|
||||
if(is_reebe(z))
|
||||
resistance_flags |= INDESTRUCTIBLE
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork/ratvar_act()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_act()
|
||||
if(turf_z_is_planet(src))
|
||||
if(is_planet_level(z))
|
||||
return ..()
|
||||
ChangeTurf(/turf/open/space)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define RANDOM_LOWER_X 50
|
||||
#define RANDOM_LOWER_Y 50
|
||||
|
||||
/proc/spawn_rivers(target_z = 5, nodes = 4, turf_type = /turf/open/lava/smooth/lava_land_surface, whitelist_area = /area/lavaland/surface/outdoors, min_x = RANDOM_LOWER_X, min_y = RANDOM_LOWER_Y, max_x = RANDOM_UPPER_X, max_y = RANDOM_UPPER_Y)
|
||||
/proc/spawn_rivers(target_z = ZLEVEL_LAVALAND, nodes = 4, turf_type = /turf/open/lava/smooth/lava_land_surface, whitelist_area = /area/lavaland/surface/outdoors, min_x = RANDOM_LOWER_X, min_y = RANDOM_LOWER_Y, max_x = RANDOM_UPPER_X, max_y = RANDOM_UPPER_Y)
|
||||
var/list/river_nodes = list()
|
||||
var/num_spawned = 0
|
||||
while(num_spawned < nodes)
|
||||
|
||||
Reference in New Issue
Block a user