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 += "" for (Bot in GLOB.alive_mob_list) if(Bot.z == ai_Zlevel && !Bot.remote_disabled) //Only non-emagged bots on the same Z-level are detected! - bot_area = get_area(Bot) var/bot_mode = Bot.get_mode() d += "" //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 += "" - d += "" + d += "" d += "" d += "" d += "" diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 73b8bfd589..bd769d2d7b 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -503,7 +503,6 @@ Pass a positive integer as an argument to override a bot's default speed. /mob/living/simple_animal/bot/proc/call_bot(caller, turf/waypoint, message=TRUE) bot_reset() //Reset a bot before setting it to call mode. - var/area/end_area = get_area(waypoint) //For giving the bot temporary all-access. var/obj/item/card/id/all_access = new /obj/item/card/id @@ -515,14 +514,15 @@ Pass a positive integer as an argument to override a bot's default speed. ai_waypoint = waypoint if(path && path.len) //Ensures that a valid path is calculated! + var/end_area = get_area_name(waypoint) if(!on) turn_on() //Saves the AI the hassle of having to activate a bot manually. access_card = all_access //Give the bot all-access while under the AI's command. if(client) reset_access_timer_id = addtimer(CALLBACK (src, .proc/bot_reset), 600, TIMER_OVERRIDE|TIMER_STOPPABLE) //if the bot is player controlled, they get the extra access for a limited time - to_chat(src, "Priority waypoint set by [icon2html(calling_ai, src)] [caller]. Proceed to [end_area.name].
[path.len-1] meters to destination. You have been granted additional door access for 60 seconds.
") + to_chat(src, "Priority waypoint set by [icon2html(calling_ai, src)] [caller]. Proceed to [end_area].
[path.len-1] meters to destination. You have been granted additional door access for 60 seconds.
") if(message) - to_chat(calling_ai, "[icon2html(src, calling_ai)] [name] called to [end_area.name]. [path.len-1] meters to destination.") + to_chat(calling_ai, "[icon2html(src, calling_ai)] [name] called to [end_area]. [path.len-1] meters to destination.") pathset = 1 mode = BOT_RESPONDING tries = 0 diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 917211736b..37cf224edd 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -415,11 +415,9 @@ /mob/living/simple_animal/bot/mulebot/call_bot() ..() - var/area/dest_area if(path && path.len) target = ai_waypoint //Target is the end point of the path, the waypoint set by the AI. - dest_area = get_area(target) - destination = format_text(dest_area.name) + destination = get_area_name(target, TRUE) pathset = 1 //Indicates the AI's custom path is initialized. start() @@ -608,7 +606,7 @@ if(AM && AM.Adjacent(src)) load(AM) if(report_delivery) - speak("Now loading [load] at [get_area(src)].", radio_channel) + speak("Now loading [load] at [get_area_name(src)].", radio_channel) // whatever happened, check to see if we return home if(auto_return && home_destination && destination != home_destination) diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index f1e8848d27..2c6bb8112b 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -85,8 +85,7 @@ playsound(user, "explosion", 100, 1) var/turf/starting = get_turf(user) var/turf/targturf = get_turf(target) - var/area/A = get_area(user) - var/log_str = "Blast wave fired from [ADMIN_COORDJMP(starting)] ([A.name]) at [ADMIN_COORDJMP(targturf)] ([target.name]) by [user.name]([user.ckey]) with power [heavy]/[medium]/[light]." + var/log_str = "Blast wave fired from [ADMIN_COORDJMP(starting)] ([get_area_name(user, TRUE)]) at [ADMIN_COORDJMP(targturf)] ([target.name]) by [user.name]([user.ckey]) with power [heavy]/[medium]/[light]." message_admins(log_str) log_game(log_str) var/obj/item/projectile/blastwave/BW = new(loc, heavy, medium, light) diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 6bcc3412ca..d90b93ea06 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -35,8 +35,7 @@ chemical_mob_spawn_nicecritters += T var/atom/A = holder.my_atom var/turf/T = get_turf(A) - var/area/my_area = get_area(T) - var/message = "A [reaction_name] reaction has occurred in [my_area.name] [ADMIN_COORDJMP(T)]" + var/message = "A [reaction_name] reaction has occurred in [get_area_name(T)] [ADMIN_COORDJMP(T)]" message += " (VV)" var/mob/M = get(A, /mob) diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 1fbdfb6fb8..d63439f7e7 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -262,8 +262,7 @@ /obj/machinery/computer/bsa_control/proc/get_target_name() if(istype(target, /area)) - var/area/A = target - return A.name + return get_area_name(target, TRUE) else if(istype(target, /obj/item/device/gps)) var/obj/item/device/gps/G = target return G.gpstag

Name

Status

Location

Control

[Bot.hacked ? "(!)" : ""] [Bot.name] ([Bot.model])[bot_mode][bot_area.name][get_area_name(Bot, TRUE)]InterfaceCall