From d41f6cce0485df3bbf3e324cd506d1682f33183d Mon Sep 17 00:00:00 2001 From: Leshana Date: Sun, 21 May 2017 22:54:42 -0400 Subject: [PATCH] Ensure computers work on centcom or when only one zlevel is accessible. --- code/game/machinery/computer/camera.dm | 2 +- code/game/machinery/computer/communications.dm | 4 ++-- code/game/machinery/computer/law.dm | 2 +- code/game/machinery/computer/security.dm | 2 +- code/game/machinery/computer/skills.dm | 2 +- code/modules/nano/modules/crew_monitor.dm | 2 ++ 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 176e2d7743..36974b159f 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -91,7 +91,7 @@ . = ..() /obj/machinery/computer/security/attack_hand(var/mob/user as mob) - if (using_map && !(src.z in using_map.station_levels)) + if (using_map && !(src.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 43a86f0e16..a8b6ee2424 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -52,7 +52,7 @@ /obj/machinery/computer/communications/Topic(href, href_list) if(..()) return 1 - if (using_map && !(src.z in using_map.station_levels)) + if (using_map && !(src.z in using_map.contact_levels)) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return usr.set_machine(src) @@ -274,7 +274,7 @@ /obj/machinery/computer/communications/attack_hand(var/mob/user as mob) if(..()) return - if (using_map && !(src.z in using_map.station_levels)) + if (using_map && !(src.z in using_map.contact_levels)) user << "\red Unable to establish a connection: \black You're too far away from the station!" return diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index abbf65b44f..8def6db394 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -26,7 +26,7 @@ attackby(obj/item/weapon/O as obj, mob/user as mob) - if (user.z > 6) + if (using_map && !(user.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return if(istype(O, /obj/item/weapon/aiModule)) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 4c31aa8ad9..1179d3a2b2 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -56,7 +56,7 @@ /obj/machinery/computer/secure_data/attack_hand(mob/user as mob) if(..()) return - if (using_map && !(src.z in using_map.station_levels)) + if (using_map && !(src.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return var/dat diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 9647204e97..fb92e700ff 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -39,7 +39,7 @@ /obj/machinery/computer/skills/attack_hand(mob/user as mob) if(..()) return - if (using_map && !(src.z in using_map.station_levels)) + if (using_map && !(src.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return var/dat diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index ba36fc6d68..8a6ef7624e 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -33,6 +33,8 @@ ui.add_template("mapContent", "crew_monitor_map_content.tmpl") // adding a template with the key "mapHeader" replaces the map header content ui.add_template("mapHeader", "crew_monitor_map_header.tmpl") + if(!(ui.map_z_level in data["map_levels"])) + ui.set_map_z_level(data["map_levels"][1]) ui.set_initial_data(data) ui.open()