diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 0e1c1c3979..67ec38bdcf 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -14,8 +14,10 @@
var/turf/T = get_turf(A)
return T ? T.loc : null
-/proc/get_area_name(atom/X)
+/proc/get_area_name(atom/X, format_text = FALSE)
var/area/Y = get_area(X)
+ if(format_text)
+ return format_text(Y.name)
return Y.name
/proc/get_area_by_name(N) //get area by its name
diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index 2ad2eb76f5..97d6549048 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -341,12 +341,11 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
return
var/turf/P = get_turf(blood_target)
var/turf/Q = get_turf(mob_viewer)
- var/area/A = get_area(P)
if(P.z != Q.z) //The target is on a different Z level, we cannot sense that far.
icon_state = "runed_sense2"
desc = "[blood_target] is no longer in your sector, you cannot sense its presence here."
return
- desc = "You are currently tracking [blood_target] in [A.name]."
+ desc = "You are currently tracking [blood_target] in [get_area_name(blood_target)]."
var/target_angle = Get_Angle(Q, P)
var/target_dist = get_dist(P, Q)
cut_overlays()
diff --git a/code/game/gamemodes/clock_cult/clock_structures/ratvar_the_clockwork_justicar.dm b/code/game/gamemodes/clock_cult/clock_structures/ratvar_the_clockwork_justicar.dm
index b069e55454..dbf6e69aa2 100644
--- a/code/game/gamemodes/clock_cult/clock_structures/ratvar_the_clockwork_justicar.dm
+++ b/code/game/gamemodes/clock_cult/clock_structures/ratvar_the_clockwork_justicar.dm
@@ -28,8 +28,7 @@
send_to_playing_players("[text2ratvar("ONCE AGAIN MY LIGHT SHINES AMONG THESE PATHETIC STARS")]")
sound_to_playing_players('sound/effects/ratvar_reveal.ogg')
var/mutable_appearance/alert_overlay = mutable_appearance('icons/effects/clockwork_effects.dmi', "ratvar_alert")
- var/area/A = get_area(src)
- notify_ghosts("The Justiciar's light calls to you! Reach out to Ratvar in [A.name] to be granted a shell to spread his glory!", null, source = src, alert_overlay = alert_overlay)
+ notify_ghosts("The Justiciar's light calls to you! Reach out to Ratvar in [get_area_name(src)] to be granted a shell to spread his glory!", null, source = src, alert_overlay = alert_overlay)
INVOKE_ASYNC(SSshuttle.emergency, /obj/docking_port/mobile/emergency.proc/request, null, 10, null, FALSE, 0)
/obj/structure/destructible/clockwork/massive/ratvar/Destroy()
diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm
index c308d4335b..7397b2a064 100644
--- a/code/game/machinery/computer/crew.dm
+++ b/code/game/machinery/computer/crew.dm
@@ -194,9 +194,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
if (U.sensor_mode >= SENSOR_COORDS)
if (!pos)
pos = get_turf(H)
- var/area/player_area = get_area(H)
-
- area = format_text(player_area.name)
+ area = get_area_name(H, TRUE)
pos_x = pos.x
pos_y = pos.y
else
diff --git a/code/game/machinery/doors/alarmlock.dm b/code/game/machinery/doors/alarmlock.dm
index 1649082138..a75d47b345 100644
--- a/code/game/machinery/doors/alarmlock.dm
+++ b/code/game/machinery/doors/alarmlock.dm
@@ -33,8 +33,7 @@
var/alarm_area = signal.data["zone"]
var/alert = signal.data["alert"]
- var/area/our_area = get_area(src)
- if(alarm_area == our_area.name)
+ if(alarm_area == get_area_name(src))
switch(alert)
if("severe")
autoclose = TRUE
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index 670ea2bccf..25e022febc 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -758,7 +758,6 @@
return
user.set_machine(src)
- var/area/area = get_area(src)
var/t = ""
if(locked && !(issilicon(user) || IsAdminGhost(user)))
@@ -769,7 +768,7 @@
t += "Turrets [enabled?"activated":"deactivated"] - [enabled?"Disable":"Enable"]?
"
t += "Currently set for [lethal?"lethal":"stun repeatedly"] - Change to [lethal?"Stun repeatedly":"Lethal"]?
"
- var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])")
+ var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([get_area_name(src, TRUE)])")
popup.set_content(t)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm
index 07e80a1211..9d01e2a7aa 100644
--- a/code/game/objects/items/devices/gps.dm
+++ b/code/game/objects/items/devices/gps.dm
@@ -82,7 +82,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
return data
var/turf/curr = get_turf(src)
- data["current"] = "[get_area_name(curr)] ([curr.x], [curr.y], [curr.z])"
+ data["current"] = "[get_area_name(curr, TRUE)] ([curr.x], [curr.y], [curr.z])"
var/list/signals = list()
data["signals"] = list()
@@ -94,10 +94,9 @@ GLOBAL_LIST_EMPTY(GPS_list)
var/turf/pos = get_turf(G)
if(!global_mode && pos.z != curr.z)
continue
- var/area/gps_area = get_area_name(G)
var/list/signal = list()
signal["entrytag"] = G.gpstag //Name or 'tag' of the GPS
- signal["area"] = format_text(gps_area)
+ signal["area"] = get_area_name(G, TRUE)
signal["coord"] = "[pos.x], [pos.y], [pos.z]"
if(pos.z == curr.z) //Distance/Direction calculations for same z-level only
signal["dist"] = max(get_dist(curr, pos), 0) //Distance between the src and remote GPS turfs
diff --git a/code/game/objects/items/grenades/grenade.dm b/code/game/objects/items/grenades/grenade.dm
index c19ce4620d..b4df4493ca 100644
--- a/code/game/objects/items/grenades/grenade.dm
+++ b/code/game/objects/items/grenades/grenade.dm
@@ -46,11 +46,10 @@
preprime(user)
/obj/item/grenade/proc/log_grenade(mob/user, turf/T)
- var/area/A = get_area(T)
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed \a [src] for detonation at [ADMIN_COORDJMP(T)]"
GLOB.bombers += message
message_admins(message)
- log_game("[key_name(user)] has primed \a [src] for detonation at [A.name] [COORD(T)].")
+ log_game("[key_name(user)] has primed \a [src] for detonation at [get_area_name(T, TRUE)] [COORD(T)].")
/obj/item/grenade/proc/preprime(mob/user, delayoverride, msg = TRUE, volume = 60)
var/turf/T = get_turf(src)
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index 96b7df597c..1edd95da26 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -169,9 +169,8 @@
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0
- var/area/A = get_area(src)
if(name == initial(name))
- name = "[A.name] Air Alarm"
+ name = "[get_area_name(src)] Air Alarm"
update_icon()
@@ -624,10 +623,8 @@
if(!frequency)
return
- var/area/A = get_area(src)
-
var/datum/signal/alert_signal = new(list(
- "zone" = A.name,
+ "zone" = get_area_name(src),
"type" = "Atmospheric"
))
if(alert_level==2)
diff --git a/code/modules/awaymissions/signpost.dm b/code/modules/awaymissions/signpost.dm
index b1f85ca537..cbf4dea906 100644
--- a/code/modules/awaymissions/signpost.dm
+++ b/code/modules/awaymissions/signpost.dm
@@ -21,9 +21,8 @@
var/turf/T = find_safe_turf(zlevels=zlevels)
if(T)
- var/area/A = get_area(T)
user.forceMove(T)
- to_chat(user, "You blink and find yourself in [A.name].")
+ to_chat(user, "You blink and find yourself in [get_area_name(T)].")
else
to_chat(user, "Nothing happens. You feel that this is a bad sign.")
if("No")
diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm
index fa0d5aadf8..b94f7dd9eb 100644
--- a/code/modules/events/pirates.dm
+++ b/code/modules/events/pirates.dm
@@ -264,7 +264,6 @@
if(!results.len)
return
var/atom/movable/AM = pick_n_take(results)
- var/area/loot_area = get_area(AM)
- say("Located: [AM.name] at [loot_area.name]")
+ say("Located: [AM.name] at [get_area_name(AM)]")
#undef LOOT_LOCATOR_COOLDOWN
\ No newline at end of file
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index 886d9b4837..c2102a4a05 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -1070,8 +1070,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
target.set_screwyhud(SCREWYHUD_DEAD)
target.Knockdown(300)
target.silent += 10
- var/area/area = get_area(target)
- to_chat(target, "[target.mind.name] has died at [area.name].")
+ to_chat(target, "[target.mind.name] has died at [get_area_name(target)].")
if(prob(50))
var/mob/fakemob
var/list/dead_people = list()
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index f23270e92a..61940b4044 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -159,8 +159,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
/obj/structure/extraction_point/Initialize()
. = ..()
- var/area/area_name = get_area(src)
- name += " ([rand(100,999)]) ([area_name.name])"
+ name += " ([rand(100,999)]) ([get_area_name(src, TRUE)])"
GLOB.total_extraction_beacons += src
/obj/structure/extraction_point/Destroy()
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index 5d10ea6b36..f391c20f1c 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -260,8 +260,7 @@
var/list/L = list()
// HTML colors need a # prefix
L["htmlcolor"] = "#[body.dna.features["mcolor"]]"
- var/area/A = get_area(body)
- L["area"] = A.name
+ L["area"] = get_area_name(body, TRUE)
var/stat = "error"
switch(body.stat)
if(CONSCIOUS)
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index 013e140a7f..36cf94df3b 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -49,11 +49,10 @@
timeofdeath = world.time
tod = worldtime2text()
var/turf/T = get_turf(src)
- var/area/A = get_area(T)
for(var/obj/item/I in contents)
I.on_mob_death(src, gibbed)
if(mind && mind.name && mind.active && (!(T.flags_1 & NO_DEATHRATTLE_1)))
- var/rendered = "[mind.name] has died at [A.name]."
+ var/rendered = "[mind.name] has died at [get_area_name(T)]."
deadchat_broadcast(rendered, follow_target = src, turf_target = T, message_type=DEADCHAT_DEATHRATTLE)
if(mind)
mind.store_memory("Time of death: [tod]", 0)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 6970ad3feb..7056239121 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -243,9 +243,7 @@
if(!stat)
stat(null, text("System integrity: [(health+100)/2]%"))
stat(null, text("Connected cyborgs: [connected_robots.len]"))
- var/area/borg_area
for(var/mob/living/silicon/robot/R in connected_robots)
- borg_area = get_area(R)
var/robot_status = "Nominal"
if(R.shell)
robot_status = "AI SHELL"
@@ -255,7 +253,7 @@
robot_status = "DEPOWERED"
//Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies!
stat(null, text("[R.name] | S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge]/[R.cell.maxcharge]" : "Empty"] | \
- Module: [R.designation] | Loc: [borg_area.name] | Status: [robot_status]"))
+ Module: [R.designation] | Loc: [get_area_name(R, TRUE)] | Status: [robot_status]"))
stat(null, text("AI shell beacons detected: [LAZYLEN(GLOB.available_ai_shells)]")) //Count of total AI shells
else
stat(null, text("Systems nonfunctional"))
@@ -456,18 +454,16 @@
var/turf/ai_current_turf = get_turf(src)
var/ai_Zlevel = ai_current_turf.z
var/d
- var/area/bot_area
d += "Query network status
"
d += "
Name | Status | Location | Control | ||
| [Bot.hacked ? "(!)" : ""] [Bot.name] ([Bot.model]) | " //If the bot is on, it will display the bot's current mode status. If the bot is not mode, it will just report "Idle". "Inactive if it is not on at all. d += "[bot_mode] | " - d += "[bot_area.name] | " + d += "[get_area_name(Bot, TRUE)] | " d += "Interface | " d += "Call | " d += "