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
This commit is contained in:
mwerezak
2014-05-22 17:25:08 -04:00
parent f577d21f8f
commit eb58fb1e0c
2 changed files with 9 additions and 30 deletions
+6 -28
View File
@@ -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.
@@ -141,35 +142,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
@@ -186,6 +160,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