From dd2fcf0eb31b2b0cae0b4c3992fc9f969ec33b20 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Thu, 22 May 2014 17:25:08 -0400 Subject: [PATCH] Fixes RD console circuit var not set. Also removes redundant attackby code, and small change to text when setting access protocol on the board. Related to issue #5006 --- .../game/machinery/computer/buildandrepair.dm | 5 +-- code/modules/research/rdconsole.dm | 34 ++++--------------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 9d6769c4498..01b682f4668 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -293,14 +293,15 @@ /obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob) if(istype(I,/obj/item/weapon/screwdriver)) + user << "\blue You adjust the jumper on the access protocol pins." if(src.build_path == "/obj/machinery/computer/rdconsole/core") src.name = "Circuit Board (RD Console - Robotics)" src.build_path = "/obj/machinery/computer/rdconsole/robotics" - user << "\blue Access protocols succesfully updated." + user << "\blue Access protocols set to robotics." else src.name = "Circuit Board (RD Console)" src.build_path = "/obj/machinery/computer/rdconsole/core" - user << "\blue Defaulting access protocols." + user << "\blue Access protocols set to default." return /obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 53d35a5e74c..9e997c4cd58 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -34,6 +34,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole name = "R&D Console" icon_state = "rdcomp" + circuit = /obj/item/weapon/circuitboard/rdconsole var/datum/research/files //Stores all the collected research data. var/obj/item/weapon/disk/tech_disk/t_disk = null //Stores the technology disk. var/obj/item/weapon/disk/design_disk/d_disk = null //Stores the design disk. @@ -147,35 +148,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, */ /obj/machinery/computer/rdconsole/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob) - //The construction/deconstruction of the console code. - if(istype(D, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - new /obj/item/weapon/shard( src.loc ) - var/obj/item/weapon/circuitboard/rdconsole/M = new /obj/item/weapon/circuitboard/rdconsole( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc ) - var/obj/item/weapon/circuitboard/rdconsole/M = new /obj/item/weapon/circuitboard/rdconsole( A ) - for (var/obj/C in src) - C.loc = src.loc - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src) //Loading a disk into it. - else if(istype(D, /obj/item/weapon/disk)) + if(istype(D, /obj/item/weapon/disk)) if(t_disk || d_disk) user << "A disk is already loaded into the machine." return @@ -192,6 +166,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) emagged = 1 user << "\blue You you disable the security protocols" + else + //The construction/deconstruction of the console code. + ..() + src.updateUsrDialog() return