From 039a79ff26acfcba72122a3d5c6b12c783b0e1d9 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 23 Sep 2015 02:52:07 +0200 Subject: [PATCH] Research consoles auto sync fix --- code/modules/research/rdconsole.dm | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 671fc9a369b..577397b70fc 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -102,8 +102,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, return return_name /obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any). - for(var/obj/machinery/r_n_d/D in oview(3,src)) - if(D.linked_console != null || D.disabled || D.panel_open) + for(var/obj/machinery/r_n_d/D in range(3,src)) + if(!isnull(D.linked_console) || D.disabled || D.panel_open) continue if(istype(D, /obj/machinery/r_n_d/destructive_analyzer)) if(linked_destroy == null) @@ -144,6 +144,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, break /obj/machinery/computer/rdconsole/initialize() + ..() SyncRDevices() /* Instead of calling this every tick, it is only being called when needed @@ -181,7 +182,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/Topic(href, href_list) if(..()) - return + return 1 + + if(!allowed(usr)) + return 1 add_fingerprint(usr) @@ -601,7 +605,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/attack_hand(mob/user as mob) if(..()) - return + return 1 + if(!allowed(user)) + user << "Access denied." + return 1 interact(user) /obj/machinery/computer/rdconsole/interact(mob/user) @@ -1113,15 +1120,13 @@ won't update every console in existence) but it's more of a hassle to do. Also, name = "Robotics R&D Console" desc = "A console used to interface with R&D tools." id = 2 - req_access = null - req_access_txt = "29" + req_access = list(access_robotics) /obj/machinery/computer/rdconsole/mechanics name = "Mechanics R&D Console" desc = "A console used to interface with R&D tools." id = 4 - req_access = null - req_access_txt = "70" + req_access = list(access_mechanic) /obj/machinery/computer/rdconsole/core name = "Core R&D Console" @@ -1131,4 +1136,5 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/experiment name = "E.X.P.E.R.I-MENTOR R&D Console" desc = "A console used to interface with R&D tools." - id = 3 \ No newline at end of file + id = 3 + \ No newline at end of file