Replace explicit z-level checks with defines
This commit is contained in:
committed by
CitadelStationBot
parent
48e0c47410
commit
0418ee4df6
@@ -0,0 +1,17 @@
|
||||
// Helpers for checking whether a z-level conforms to a specific requirement
|
||||
|
||||
// Basic levels
|
||||
#define is_centcom_level(z) ((z) == ZLEVEL_CENTCOM)
|
||||
|
||||
#define is_station_level(z) ((z) in GLOB.station_z_levels)
|
||||
|
||||
#define is_mining_level(z) ((z) == ZLEVEL_MINING)
|
||||
|
||||
#define is_reebe(z) ((z) == ZLEVEL_CITYOFCOGS)
|
||||
|
||||
#define is_transit_level(z) ((z) == ZLEVEL_TRANSIT)
|
||||
|
||||
#define is_away_level(z) ((z) > ZLEVEL_SPACEMAX)
|
||||
|
||||
// If true, the singularity cannot strip away asteroid turf on this Z
|
||||
#define is_planet_level(z) (GLOB.z_is_planet["z"])
|
||||
@@ -182,7 +182,7 @@
|
||||
num_human_escapees++
|
||||
if(shuttle_areas[get_area(Player)])
|
||||
num_shuttle_escapees++
|
||||
|
||||
|
||||
.[POPCOUNT_SURVIVORS] = num_survivors
|
||||
.[POPCOUNT_ESCAPEES] = num_escapees
|
||||
.[POPCOUNT_SHUTTLE_ESCAPEES] = num_shuttle_escapees
|
||||
@@ -194,7 +194,7 @@
|
||||
var/list/parts = list()
|
||||
var/station_evacuated = EMERGENCY_ESCAPED_OR_ENDGAMED
|
||||
var/popcount = count_survivors()
|
||||
|
||||
|
||||
//Round statistics report
|
||||
var/datum/station_state/end_state = new /datum/station_state()
|
||||
end_state.count()
|
||||
@@ -393,7 +393,7 @@
|
||||
text += " <span class='greentext'>survived</span>"
|
||||
if(fleecheck)
|
||||
var/turf/T = get_turf(ply.current)
|
||||
if(!T || !(T.z in GLOB.station_z_levels))
|
||||
if(!T || !is_station_level(T.z))
|
||||
text += " while <span class='redtext'>fleeing the station</span>"
|
||||
if(ply.current.real_name != ply.name)
|
||||
text += " as <b>[ply.current.real_name]</b>"
|
||||
|
||||
@@ -1434,11 +1434,6 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
temp = ((temp + (temp>>3))&29127) % 63 //070707
|
||||
return temp
|
||||
|
||||
//checks if a turf is in the planet z list.
|
||||
/proc/turf_z_is_planet(turf/T)
|
||||
return GLOB.z_is_planet["[T.z]"]
|
||||
|
||||
|
||||
//same as do_mob except for movables and it allows both to drift and doesn't draw progressbar
|
||||
/proc/do_atom(atom/movable/user , atom/movable/target, time = 30, uninterruptible = 0,datum/callback/extra_checks = null)
|
||||
if(!user || !target)
|
||||
|
||||
@@ -30,7 +30,7 @@ SUBSYSTEM_DEF(communications)
|
||||
|
||||
/datum/controller/subsystem/communications/proc/send_message(datum/comm_message/sending,print = TRUE,unique = FALSE)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
if(!(C.stat & (BROKEN|NOPOWER)) && (C.z in GLOB.station_z_levels))
|
||||
if(!(C.stat & (BROKEN|NOPOWER)) && is_station_level(C.z))
|
||||
if(unique)
|
||||
C.add_message(sending)
|
||||
else //We copy the message for each console, answers and deletions won't be shared
|
||||
|
||||
@@ -146,7 +146,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
var/list/station_areas_blacklist = typecacheof(list(/area/space, /area/mine, /area/ruin))
|
||||
for(var/area/A in world)
|
||||
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 GLOB.the_station_areas) && !is_type_in_typecache(A, station_areas_blacklist))
|
||||
GLOB.the_station_areas.Add(A.type)
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ SUBSYSTEM_DEF(minimap)
|
||||
for(var/z in z_levels)
|
||||
send_asset(client, "minimap_[z].png")
|
||||
|
||||
/datum/controller/subsystem/minimap/proc/generate(z = 1, x1 = 1, y1 = 1, x2 = world.maxx, y2 = world.maxy)
|
||||
/datum/controller/subsystem/minimap/proc/generate(z, x1 = 1, y1 = 1, x2 = world.maxx, y2 = world.maxy)
|
||||
// Load the background.
|
||||
var/icon/minimap = new /icon('icons/minimap.dmi')
|
||||
// Scale it up to our target size.
|
||||
|
||||
@@ -325,7 +325,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
continue
|
||||
|
||||
var/turf/T = get_turf(thing)
|
||||
if(T && (T.z in GLOB.station_z_levels))
|
||||
if(T && is_station_level(T.z))
|
||||
callShuttle = 0
|
||||
break
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
var/sanity = 0
|
||||
while(summon_spots.len < SUMMON_POSSIBILITIES && sanity < 100)
|
||||
var/area/summon = pick(GLOB.sortedAreas - summon_spots)
|
||||
if(summon && (summon.z in GLOB.station_z_levels) && summon.valid_territory)
|
||||
if(summon && is_station_level(summon.z) && summon.valid_territory)
|
||||
summon_spots += summon
|
||||
sanity++
|
||||
update_explanation_text()
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
/datum/team/nuclear/proc/syndies_escaped()
|
||||
var/obj/docking_port/mobile/S = SSshuttle.getShuttle("syndicate")
|
||||
return (S && (S.z == ZLEVEL_CENTCOM || S.z == ZLEVEL_TRANSIT))
|
||||
return S && (is_centcom_level(S.z) || is_transit_level(S.z))
|
||||
|
||||
/datum/team/nuclear/proc/get_result()
|
||||
var/evacuation = SSshuttle.emergency.mode == SHUTTLE_ENDGAME
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
AD.Refresh()
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
|
||||
if(!(H.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(H.z))
|
||||
continue
|
||||
if(!H.HasDisease(D))
|
||||
H.ForceContractDisease(D)
|
||||
|
||||
+1
-1
@@ -545,7 +545,7 @@
|
||||
if(I == src)
|
||||
continue
|
||||
var/mob/M = I.current
|
||||
if(M && (M.z in GLOB.station_z_levels) && !M.stat)
|
||||
if(M && is_station_level(M.z) && !M.stat)
|
||||
last_healthy_headrev = FALSE
|
||||
break
|
||||
text += "head | not mindshielded | <a href='?src=[REF(src)];revolution=clear'>employee</a> | <b>[last_healthy_headrev ? "<font color='red'>LAST </font> " : ""]HEADREV</b> | <a href='?src=[REF(src)];revolution=rev'>rev</a>"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)]")
|
||||
|
||||
@@ -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++
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
/obj/item/clothing/glasses/meson/engine/process()
|
||||
if(mode == MODE_MESON)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && T.z == ZLEVEL_MINING)
|
||||
if(T && is_mining_level(T.z))
|
||||
toggle_mode(loc)
|
||||
return
|
||||
|
||||
|
||||
@@ -40,8 +40,13 @@
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
|
||||
if(QDELETED(temp_vent))
|
||||
continue
|
||||
<<<<<<< HEAD
|
||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
||||
=======
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
//Stops Aliens getting stuck in small networks.
|
||||
//See: Security, Virology
|
||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/datum/round_event/brand_intelligence/start()
|
||||
for(var/obj/machinery/vending/V in GLOB.machines)
|
||||
if(!(V.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(V.z))
|
||||
continue
|
||||
vendingMachines.Add(V)
|
||||
if(!vendingMachines.len)
|
||||
|
||||
@@ -33,7 +33,11 @@
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
<<<<<<< HEAD
|
||||
if(T.z != ZLEVEL_STATION_PRIMARY)
|
||||
=======
|
||||
if(!is_station_level(T.z))
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
continue
|
||||
if(!H.client)
|
||||
continue
|
||||
|
||||
@@ -15,5 +15,5 @@
|
||||
/datum/round_event/grid_check/start()
|
||||
for(var/P in GLOB.apcs_list)
|
||||
var/obj/machinery/power/apc/C = P
|
||||
if(C.cell && (C.z in GLOB.station_z_levels))
|
||||
if(C.cell && is_station_level(C.z))
|
||||
C.energy_fail(rand(30,120))
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
/obj/machinery/shuttle_scrambler/process()
|
||||
if(active)
|
||||
if(z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
var/siphoned = min(SSshuttle.points,siphon_per_tick)
|
||||
SSshuttle.points -= siphoned
|
||||
credits_stored += siphoned
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
/obj/docking_port/mobile/pirate/initiate_docking(obj/docking_port/stationary/new_dock, movement_direction, force=FALSE)
|
||||
. = ..()
|
||||
if(. == DOCKING_SUCCESS && new_dock.z != ZLEVEL_TRANSIT)
|
||||
if(. == DOCKING_SUCCESS && !is_transit_level(new_dock.z))
|
||||
engines_cooling = TRUE
|
||||
addtimer(CALLBACK(src,.proc/reset_cooldown),engine_cooldown,TIMER_UNIQUE)
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
var/list/results = list()
|
||||
for(var/atom/movable/AM in world)
|
||||
if(is_type_in_typecache(AM,GLOB.pirate_loot_cache))
|
||||
if(AM.z in GLOB.station_z_levels)
|
||||
if(is_station_level(AM.z))
|
||||
if(get_area(AM) == get_area(src)) //Should this be variable ?
|
||||
continue
|
||||
results += AM
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/list/potential = list()
|
||||
for(var/mob/living/simple_animal/L in GLOB.alive_mob_list)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!(T.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(T.z))
|
||||
continue
|
||||
if(!(L in GLOB.player_list) && !L.mind)
|
||||
potential += L
|
||||
|
||||
@@ -22,8 +22,13 @@
|
||||
/datum/round_event/spider_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in world)
|
||||
<<<<<<< HEAD
|
||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
||||
=======
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||
vents += temp_vent
|
||||
|
||||
|
||||
@@ -19,8 +19,13 @@
|
||||
/datum/round_event/vent_clog/setup()
|
||||
endWhen = rand(25, 100)
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
|
||||
<<<<<<< HEAD
|
||||
if((temp_vent.loc.z in GLOB.station_z_levels) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.PARENT1
|
||||
=======
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
if(temp_vent_parent.other_atmosmch.len > 20)
|
||||
vents += temp_vent
|
||||
if(!vents.len)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
ruins_wizard_loadout = 1
|
||||
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(ruins_spaceworthiness && !(H.z in GLOB.station_z_levels) || isspaceturf(H.loc) || isplasmaman(H))
|
||||
if(ruins_spaceworthiness && !is_station_level(H.z) || isspaceturf(H.loc) || isplasmaman(H))
|
||||
continue //#savetheminers
|
||||
if(ruins_wizard_loadout && iswizard(H))
|
||||
continue
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/greentext/process()
|
||||
if(new_holder && new_holder.z == ZLEVEL_CENTCOM)//you're winner!
|
||||
if(new_holder && is_centcom_level(new_holder.z))//you're winner!
|
||||
to_chat(new_holder, "<font color='green'>At last it feels like victory is assured!</font>")
|
||||
if(!(new_holder in SSticker.mode.traitors))
|
||||
SSticker.mode.traitors += new_holder.mind
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/datum/round_event_control/wizard/petsplosion/preRunEvent()
|
||||
for(var/mob/living/simple_animal/F in GLOB.alive_mob_list)
|
||||
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
|
||||
if(!ishostile(F) && is_station_level(F.z))
|
||||
mobs_to_dupe++
|
||||
if(mobs_to_dupe > 100 || !mobs_to_dupe)
|
||||
return EVENT_CANT_RUN
|
||||
@@ -24,7 +24,7 @@
|
||||
if(activeFor >= 30 * countdown) // 0 seconds : 2 animals | 30 seconds : 4 animals | 1 minute : 8 animals
|
||||
countdown += 1
|
||||
for(var/mob/living/simple_animal/F in GLOB.alive_mob_list) //If you cull the heard before the next replication, things will be easier for you
|
||||
if(!ishostile(F) && (F.z in GLOB.station_z_levels))
|
||||
if(!ishostile(F) && is_station_level(F.z))
|
||||
new F.type(F.loc)
|
||||
mobs_duped++
|
||||
if(mobs_duped > 400)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/list/mobs = list()
|
||||
|
||||
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 //lets not try to strand people in space or stuck in the wizards den
|
||||
moblocs += H.loc
|
||||
mobs += H
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/datum/round_event/wormholes/start()
|
||||
for(var/turf/open/floor/T in world)
|
||||
if(T.z in GLOB.station_z_levels)
|
||||
if(is_station_level(T.z))
|
||||
pick_turfs += T
|
||||
|
||||
for(var/i = 1, i <= number_of_wormholes, i++)
|
||||
|
||||
@@ -63,7 +63,6 @@ GLOBAL_LIST_EMPTY(z_is_planet)
|
||||
/obj/effect/mapping_helpers/planet_z/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(!turf_z_is_planet(T))
|
||||
GLOB.z_is_planet["[T.z]"] = list()
|
||||
GLOB.z_is_planet["[T.z]"] = TRUE
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
|
||||
var/list/options = params2list(possible_destinations)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
var/dat = "[(z in GLOB.station_z_levels) ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]<br>"
|
||||
var/dat = "[is_station_level(z) ? "Docking clamps engaged. Standing by." : "Mining Shuttle Uplink: [M ? M.getStatusText() : "*OFFLINE*"]"]<br>"
|
||||
if(M)
|
||||
var/destination_found
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
@@ -47,7 +47,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
continue
|
||||
destination_found = 1
|
||||
dat += "<A href='?src=[REF(src)];move=[S.id]'>Send to [S.name]</A><br>"
|
||||
if(!destination_found && (z in GLOB.station_z_levels)) //Only available if miners are lazy and did not set an LZ using the remote.
|
||||
if(!destination_found && is_station_level(z)) //Only available if miners are lazy and did not set an LZ using the remote.
|
||||
dat += "<A href='?src=[REF(src)];random=1'>Prepare for blind drop? (Dangerous)</A><br>"
|
||||
if(LAZYLEN(turrets))
|
||||
dat += "<br><b>Perimeter Defense System:</b> <A href='?src=[REF(src)];turrets_power=on'>Enable All</A> / <A href='?src=[REF(src)];turrets_power=off'>Disable All</A><br> \
|
||||
@@ -86,7 +86,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
return
|
||||
|
||||
if(href_list["move"])
|
||||
if(!(z in GLOB.station_z_levels) && shuttleId == "colony_drop")
|
||||
if(!is_station_level(z) && shuttleId == "colony_drop")
|
||||
to_chat(usr, "<span class='warning'>You can't move the base again!</span>")
|
||||
return
|
||||
var/shuttle_error = SSshuttle.moveShuttle(shuttleId, href_list["move"], 1)
|
||||
@@ -128,7 +128,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/auxillary_base/proc/set_mining_mode()
|
||||
if(z == ZLEVEL_MINING) //The console switches to controlling the mining shuttle once landed.
|
||||
if(is_mining_level(z)) //The console switches to controlling the mining shuttle once landed.
|
||||
req_one_access = list()
|
||||
shuttleId = "mining" //The base can only be dropped once, so this gives the console a new purpose.
|
||||
possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public"
|
||||
@@ -140,7 +140,17 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
to_chat(user, "<span class='warning'>This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.</span>")
|
||||
return
|
||||
if(!no_restrictions)
|
||||
<<<<<<< HEAD
|
||||
if(T.z != ZLEVEL_MINING)
|
||||
=======
|
||||
var/static/list/disallowed_turf_types = typecacheof(list(
|
||||
/turf/open/lava,
|
||||
/turf/closed/indestructible,
|
||||
/turf/open/indestructible,
|
||||
))
|
||||
|
||||
if(!is_mining_level(T.z))
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
return BAD_ZLEVEL
|
||||
var/colony_radius = max(base_dock.width, base_dock.height)*0.5
|
||||
if(T.x - colony_radius < 1 || T.x + colony_radius >= world.maxx || T.y - colony_radius < 1 || T.y + colony_radius >= world.maxx)
|
||||
@@ -200,7 +210,7 @@ interface with the mining shuttle at the landing site if a mobile beacon is also
|
||||
var/obj/machinery/computer/auxillary_base/AB
|
||||
|
||||
for (var/obj/machinery/computer/auxillary_base/A in GLOB.machines)
|
||||
if(A.z in GLOB.station_z_levels)
|
||||
if(is_station_level(A.z))
|
||||
AB = A
|
||||
break
|
||||
if(!AB)
|
||||
@@ -267,7 +277,7 @@ obj/docking_port/stationary/public_mining_dock
|
||||
|
||||
var/turf/landing_spot = get_turf(src)
|
||||
|
||||
if(landing_spot.z != ZLEVEL_MINING)
|
||||
if(!is_mining_level(landing_spot.z))
|
||||
to_chat(user, "<span class='warning'>This device is only to be used in a mining zone.</span>")
|
||||
return
|
||||
var/obj/machinery/computer/auxillary_base/aux_base_console
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
to_chat(owner, "<span class='warning'>You can only build within the mining base!</span>")
|
||||
return FALSE
|
||||
|
||||
if(!(build_target.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(build_target.z))
|
||||
to_chat(owner, "<span class='warning'>The mining base has launched and can no longer be modified.</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
var/turf/T = deploy_location
|
||||
if(T.z != ZLEVEL_MINING && T.z != ZLEVEL_LAVALAND)//only report capsules away from the mining/lavaland level
|
||||
if(!is_mining_level(T.z)) //only report capsules away from the mining/lavaland level
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] activated a bluespace capsule away from the mining level! [ADMIN_JMP(T)]")
|
||||
log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [get_area(T)][COORD(T)]")
|
||||
template.load(deploy_location, centered = TRUE)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/item/device/wormhole_jaunter/proc/turf_check(mob/user)
|
||||
var/turf/device_turf = get_turf(user)
|
||||
if(!device_turf || device_turf.z == ZLEVEL_CENTCOM || device_turf.z == ZLEVEL_TRANSIT)
|
||||
if(!device_turf || is_centcom_level(device_turf.z) || is_transit_level(device_turf.z))
|
||||
to_chat(user, "<span class='notice'>You're having difficulties getting the [src.name] to work.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
for(var/obj/item/device/radio/beacon/B in GLOB.teleportbeacons)
|
||||
var/turf/T = get_turf(B)
|
||||
if(T.z in GLOB.station_z_levels)
|
||||
if(is_station_level(T.z))
|
||||
destinations += B
|
||||
|
||||
return destinations
|
||||
|
||||
@@ -586,7 +586,7 @@
|
||||
to_chat(user, "<span class='notice'>You unfold the ladder. It extends much farther than you were expecting.</span>")
|
||||
var/last_ladder = null
|
||||
for(var/i in 1 to world.maxz)
|
||||
if(i == ZLEVEL_CENTCOM || i == ZLEVEL_TRANSIT || i == ZLEVEL_CITYOFCOGS)
|
||||
if(is_centcom_level(i) || is_transit_level(i) || is_reebe(i))
|
||||
continue
|
||||
var/turf/T2 = locate(ladder_x, ladder_y, i)
|
||||
last_ladder = new /obj/structure/ladder/unbreakable/jacob(T2, null, last_ladder)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
smelt_ore(ore)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/send_console_message()
|
||||
if(!(z in GLOB.station_z_levels))
|
||||
if(!is_station_level(z))
|
||||
return
|
||||
message_sent = TRUE
|
||||
var/area/A = get_area(src)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
req_access = list(ACCESS_MINING) // should slow the ashwalkers down.
|
||||
|
||||
/obj/machinery/computer/shuttle/mining/attack_hand(mob/user)
|
||||
if((user.z in GLOB.station_z_levels) && user.mind && is_head_revolutionary(user) && !(user.mind in dumb_rev_heads))
|
||||
if(is_station_level(user.z) && user.mind && is_head_revolutionary(user) && !(user.mind in dumb_rev_heads))
|
||||
to_chat(user, "<span class='warning'>You get a feeling that leaving the station might be a REALLY dumb idea...</span>")
|
||||
dumb_rev_heads += user.mind
|
||||
return
|
||||
|
||||
@@ -422,7 +422,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
if(drunkenness >= 91)
|
||||
adjustBrainLoss(0.4, 60)
|
||||
if(prob(20) && !stat)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && (z in GLOB.station_z_levels)) //QoL mainly
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_DOCKED && is_station_level(z)) //QoL mainly
|
||||
to_chat(src, "<span class='warning'>You're so tired... but you can't miss that shuttle...</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Just a quick nap...</span>")
|
||||
|
||||
@@ -774,9 +774,9 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return 0
|
||||
if(T.z == ZLEVEL_CENTCOM) //dont detect mobs on centcom
|
||||
if(is_centcom_level(T.z)) //dont detect mobs on centcom
|
||||
return 0
|
||||
if(T.z >= ZLEVEL_SPACEMAX)
|
||||
if(is_away_level(T.z))
|
||||
return 0
|
||||
if(user != null && src == user)
|
||||
return 0
|
||||
|
||||
@@ -479,6 +479,25 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega
|
||||
|
||||
/mob/living/simple_animal/hostile/consider_wakeup()
|
||||
..()
|
||||
<<<<<<< HEAD
|
||||
if(AIStatus == AI_IDLE && FindTarget(ListTargets(), 1))
|
||||
=======
|
||||
var/list/tlist
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if (!T)
|
||||
return
|
||||
|
||||
if (!length(SSmobs.clients_by_zlevel[T.z])) // It's fine to use .len here but doesn't compile on 511
|
||||
toggle_ai(AI_Z_OFF)
|
||||
return
|
||||
|
||||
if (isturf(T) && !is_station_level(T.z))
|
||||
tlist = ListTargetsLazy(T.z)
|
||||
else
|
||||
tlist = ListTargets()
|
||||
|
||||
if(AIStatus == AI_IDLE && FindTarget(tlist, 1))
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
toggle_ai(AI_ON)
|
||||
|
||||
|
||||
@@ -114,7 +114,11 @@ Difficulty: Medium
|
||||
if(L.stat == DEAD)
|
||||
visible_message("<span class='danger'>[src] butchers [L]!</span>",
|
||||
"<span class='userdanger'>You butcher [L], restoring your health!</span>")
|
||||
<<<<<<< HEAD
|
||||
if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
|
||||
=======
|
||||
if(!is_station_level(z) || client) //NPC monsters won't heal while on station
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
if(guidance)
|
||||
adjustHealth(-L.maxHealth)
|
||||
else
|
||||
@@ -163,7 +167,7 @@ Difficulty: Medium
|
||||
// do not take my touching of it to be endorsement of it. ~mso
|
||||
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/quick_attack_loop()
|
||||
while(!QDELETED(target) && next_move <= world.time) //this is done this way because next_move can change to be sooner while we sleep.
|
||||
stoplag(1)
|
||||
stoplag(1)
|
||||
sleep((next_move - world.time) * 1.5) //but don't ask me what the fuck this is about
|
||||
if(QDELETED(target))
|
||||
return
|
||||
|
||||
@@ -105,7 +105,11 @@
|
||||
visible_message(
|
||||
"<span class='danger'>[src] devours [L]!</span>",
|
||||
"<span class='userdanger'>You feast on [L], restoring your health!</span>")
|
||||
<<<<<<< HEAD
|
||||
if(!(z in GLOB.station_z_levels && !client)) //NPC monsters won't heal while on station
|
||||
=======
|
||||
if(!is_station_level(z) || client) //NPC monsters won't heal while on station
|
||||
>>>>>>> f2dbe5c... Replace explicit z-level checks with defines (#33829)
|
||||
adjustBruteLoss(-L.maxHealth/2)
|
||||
L.gib()
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
var/has_alert = 0
|
||||
var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list())
|
||||
var/alarm_z = list(ZLEVEL_STATION_PRIMARY,ZLEVEL_LAVALAND)
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/process_tick()
|
||||
..()
|
||||
@@ -41,7 +40,7 @@
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/alarm_monitor/proc/triggerAlarm(class, area/A, O, obj/source)
|
||||
if(!(source.z in alarm_z))
|
||||
if(!is_station_level(source.z) && !is_mining_level(source.z))
|
||||
return
|
||||
|
||||
var/list/L = alarms[class]
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
return
|
||||
for(var/obj/machinery/power/supermatter_shard/S in GLOB.machines)
|
||||
// Delaminating, not within coverage, not on a tile.
|
||||
if(!((S.z in GLOB.station_z_levels) || S.z == ZLEVEL_MINING || S.z == T.z || !isturf(S.loc)))
|
||||
if (!isturf(S.loc) || !(is_station_level(S.z) || is_mining_level(S.z) || S.z == T.z))
|
||||
continue
|
||||
supermatters.Add(S)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(holder)
|
||||
|
||||
var/turf/T = get_turf(holder)
|
||||
if((T && istype(T)) && ((T.z in GLOB.station_z_levels) || T.z == ZLEVEL_MINING))
|
||||
if((T && istype(T)) && (is_station_level(T.z) || is_mining_level(T.z)))
|
||||
// Computer is on station. Low/High signal depending on what type of network card you have
|
||||
if(long_range)
|
||||
return 2
|
||||
|
||||
@@ -941,7 +941,7 @@
|
||||
if(!malf.can_shunt)
|
||||
to_chat(malf, "<span class='warning'>You cannot shunt!</span>")
|
||||
return
|
||||
if(!(src.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(z))
|
||||
return
|
||||
occupier = new /mob/living/silicon/ai(src, malf.laws, malf) //DEAR GOD WHY? //IKR????
|
||||
occupier.adjustOxyLoss(malf.getOxyLoss())
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
var/mob/living/L = cult_mind.current
|
||||
L.narsie_act()
|
||||
for(var/mob/living/player in GLOB.player_list)
|
||||
if(player.stat != DEAD && (player.loc.z in GLOB.station_z_levels) && !iscultist(player))
|
||||
if(player.stat != DEAD && is_station_level(player.loc.z) && !iscultist(player))
|
||||
souls_needed[player] = TRUE
|
||||
soul_goal = round(1 + LAZYLEN(souls_needed) * 0.6)
|
||||
INVOKE_ASYNC(src, .proc/begin_the_end)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/mapGenerator/lavaland
|
||||
var/start_z = 5
|
||||
var/start_z = ZLEVEL_LAVALAND
|
||||
var/min_x = 0
|
||||
var/min_y = 0
|
||||
var/max_x = 0
|
||||
@@ -18,7 +18,7 @@
|
||||
/datum/mapGeneratorModule/river
|
||||
var/river_type = /turf/open/lava/smooth
|
||||
var/river_nodes = 4
|
||||
var/start_z = 5
|
||||
var/start_z = ZLEVEL_LAVALAND
|
||||
|
||||
/datum/mapGeneratorModule/river/generate()
|
||||
var/datum/mapGenerator/lavaland/L = mother
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if(!istype(mother, /datum/mapGenerator/repair/reload_station_map))
|
||||
return
|
||||
var/datum/mapGenerator/repair/reload_station_map/mother1 = mother
|
||||
if(!(mother1.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(mother1.z))
|
||||
return //This is only for reloading station blocks!
|
||||
GLOB.reloading_map = TRUE
|
||||
var/static/dmm_suite/reloader = new
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/datum/mapGenerator/repair/reload_station_map/defineRegion(turf/start, turf/end)
|
||||
. = ..()
|
||||
if(!(start.z in GLOB.station_z_levels) || !(end.z in GLOB.station_z_levels))
|
||||
if(!is_station_level(start.z) || !is_station_level(end.z))
|
||||
return
|
||||
x_low = min(start.x, end.x)
|
||||
y_low = min(start.y, end.y)
|
||||
|
||||
@@ -668,7 +668,7 @@
|
||||
|
||||
/obj/item/relic/proc/do_the_teleport(mob/user)
|
||||
var/turf/userturf = get_turf(user)
|
||||
if(loc == user && userturf.z != ZLEVEL_CENTCOM) //Because Nuke Ops bringing this back on their shuttle, then looting the ERT area is 2fun4you!
|
||||
if(loc == user && !is_centcom_level(userturf.z)) //Because Nuke Ops bringing this back on their shuttle, then looting the ERT area is 2fun4you!
|
||||
visible_message("<span class='notice'>[src] twists and bends, relocating itself!</span>")
|
||||
throwSmoke(userturf)
|
||||
do_teleport(user, userturf, 8, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
@@ -29,7 +29,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
SSshuttle.emergency.modTimer(2)
|
||||
GLOB.security_level = SEC_LEVEL_GREEN
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(GLOB.security_level < SEC_LEVEL_BLUE)
|
||||
@@ -43,7 +43,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
GLOB.security_level = SEC_LEVEL_BLUE
|
||||
sound_to_playing_players('sound/misc/voybluealert.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
if(SEC_LEVEL_RED)
|
||||
if(GLOB.security_level < SEC_LEVEL_RED)
|
||||
@@ -58,7 +58,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
GLOB.security_level = SEC_LEVEL_RED
|
||||
sound_to_playing_players('sound/misc/voyalert.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
|
||||
pod.admin_controlled = 0
|
||||
@@ -72,7 +72,7 @@ GLOBAL_VAR_INIT(security_level, 0)
|
||||
GLOB.security_level = SEC_LEVEL_DELTA
|
||||
sound_to_playing_players('sound/misc/deltakalaxon.ogg')
|
||||
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
||||
if(FA.z in GLOB.station_z_levels)
|
||||
if(is_station_level(FA.z))
|
||||
FA.update_icon()
|
||||
for(var/obj/machinery/computer/shuttle/pod/pod in GLOB.machines)
|
||||
pod.admin_controlled = 0
|
||||
|
||||
@@ -187,7 +187,7 @@ All ShuttleMove procs go here
|
||||
|
||||
/obj/machinery/computer/auxillary_base/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation)
|
||||
. = ..()
|
||||
if(z == ZLEVEL_MINING) //Avoids double logging and landing on other Z-levels due to badminnery
|
||||
if(is_mining_level(z)) //Avoids double logging and landing on other Z-levels due to badminnery
|
||||
SSblackbox.record_feedback("associative", "colonies_dropped", 1, list("x" = x, "y" = y, "z" = z))
|
||||
|
||||
/obj/machinery/gravity_generator/main/beforeShuttleMove(turf/newT, rotation, move_mode)
|
||||
|
||||
@@ -391,7 +391,7 @@
|
||||
mode = SHUTTLE_RECALL
|
||||
|
||||
/obj/docking_port/mobile/proc/enterTransit()
|
||||
if((SSshuttle.lockdown && (z in GLOB.station_z_levels)) || !canMove()) //emp went off, no escape
|
||||
if((SSshuttle.lockdown && is_station_level(z)) || !canMove()) //emp went off, no escape
|
||||
mode = SHUTTLE_IDLE
|
||||
return
|
||||
previous = null
|
||||
|
||||
@@ -45,7 +45,7 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(
|
||||
SSshuttle.supply = src
|
||||
|
||||
/obj/docking_port/mobile/supply/canMove()
|
||||
if(z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
return check_blacklist(shuttle_areas)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
if(z != ZLEVEL_CENTCOM)
|
||||
if(!is_centcom_level(z))
|
||||
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -163,7 +163,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th
|
||||
return 0
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if(T.z == ZLEVEL_CENTCOM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
if(is_centcom_level(T.z) && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
|
||||
to_chat(user, "<span class='notice'>You can't cast this spell here.</span>")
|
||||
return 0
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/datum/station_goal/proc/get_coverage()
|
||||
var/list/coverage = list()
|
||||
for(var/obj/machinery/satellite/meteor_shield/A in GLOB.machines)
|
||||
if(!A.active || !(A.z in GLOB.station_z_levels))
|
||||
if(!A.active || !is_station_level(A.z))
|
||||
continue
|
||||
coverage |= view(A.kill_range,A)
|
||||
return coverage.len
|
||||
|
||||
Reference in New Issue
Block a user