mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Merge pull request #2922 from Crazylemon64/rdboard-reconfig
RnD Console Permissions are more Persistent
This commit is contained in:
@@ -144,9 +144,34 @@
|
||||
/obj/item/weapon/circuitboard/prisoner
|
||||
name = "Circuit board (Prisoner Management)"
|
||||
build_path = /obj/machinery/computer/prisoner
|
||||
|
||||
|
||||
// RD console circuits, so that {de,re}constructing one of the special consoles doesn't ruin everything forever
|
||||
/obj/item/weapon/circuitboard/rdconsole
|
||||
name = "Circuit Board (RD Console)"
|
||||
desc = "Swipe a Research Director level ID or higher to reconfigure."
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
req_access = list(access_rd) // This is for adjusting the type of computer we're building - in case something messes up the pre-existing robotics or mechanics consoles
|
||||
var/access_types = list("R&D Core", "Robotics", "E.X.P.E.R.I-MENTOR", "Mechanics", "Public")
|
||||
id = 1
|
||||
/obj/item/weapon/circuitboard/rdconsole/robotics
|
||||
name = "Circuit Board (RD Console - Robotics)"
|
||||
build_path = /obj/machinery/computer/rdconsole/robotics
|
||||
id = 2
|
||||
/obj/item/weapon/circuitboard/rdconsole/experiment
|
||||
name = "Circuit Board (RD Console - E.X.P.E.R.I-MENTOR)"
|
||||
build_path = /obj/machinery/computer/rdconsole/experiment
|
||||
id = 3
|
||||
/obj/item/weapon/circuitboard/rdconsole/mechanics
|
||||
name = "Circuit Board (RD Console - Mechanics)"
|
||||
build_path = /obj/machinery/computer/rdconsole/mechanics
|
||||
id = 4
|
||||
/obj/item/weapon/circuitboard/rdconsole/public
|
||||
name = "Circuit Board (RD Console - Public)"
|
||||
build_path = /obj/machinery/computer/rdconsole/public
|
||||
id = 5
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/mecha_control
|
||||
name = "Circuit Board (Exosuit Control Console)"
|
||||
build_path = /obj/machinery/computer/mecha
|
||||
@@ -285,16 +310,37 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I,/obj/item/weapon/screwdriver))
|
||||
user.visible_message("\blue \the [user] adjusts the jumper on the [src]'s access protocol pins.", "\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 set to robotics."
|
||||
if(istype(I,/obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
|
||||
if(allowed(user))
|
||||
user.visible_message("<span class='notice'>\the [user] waves their ID past the [src]'s access protocol scanner.</span>", "<span class='notice'>You swipe your ID past the [src]'s access protocol scanner.</span>")
|
||||
var/console_choice = input(user, "What do you want to configure the access to?", "Access Modification", "R&D Core") as null|anything in access_types
|
||||
if(console_choice == null)
|
||||
return
|
||||
switch(console_choice)
|
||||
if("R&D Core")
|
||||
name = "Circuit Board (RD Console)"
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
id = 1
|
||||
if("Robotics")
|
||||
name = "Circuit Board (RD Console - Robotics)"
|
||||
build_path = /obj/machinery/computer/rdconsole/robotics
|
||||
id = 2
|
||||
if("E.X.P.E.R.I-MENTOR")
|
||||
name = "Circuit Board (RD Console - E.X.P.E.R.I-MENTOR)"
|
||||
build_path = /obj/machinery/computer/rdconsole/experiment
|
||||
id = 3
|
||||
if("Mechanics")
|
||||
name = "Circuit Board (RD Console - Mechanics)"
|
||||
build_path = /obj/machinery/computer/rdconsole/mechanics
|
||||
id = 4
|
||||
if("Public")
|
||||
name = "Circuit Board (RD Console - Public)"
|
||||
build_path = /obj/machinery/computer/rdconsole/public
|
||||
id = 5
|
||||
|
||||
user << "<span class='notice'>Access protocols set to [console_choice].</span>"
|
||||
else
|
||||
src.name = "Circuit Board (RD Console)"
|
||||
src.build_path = /obj/machinery/computer/rdconsole/core
|
||||
user << "\blue Access protocols set to default."
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
return
|
||||
|
||||
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob, params)
|
||||
|
||||
@@ -324,12 +324,6 @@ proc/CallMaterialName(ID)
|
||||
use_power(250)
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["lock"]) //Lock the console from use by anyone without access.
|
||||
if(src.allowed(usr))
|
||||
screen = text2num(href_list["lock"])
|
||||
else
|
||||
usr << "Unauthorized Access."
|
||||
|
||||
else if(href_list["sync"]) //Sync the research holder with all the R&D consoles in the game that aren't sync protected.
|
||||
screen = 0.0
|
||||
if(!sync)
|
||||
@@ -656,10 +650,6 @@ proc/CallMaterialName(ID)
|
||||
|
||||
if(0.1) dat += "<div class='statusDisplay'>Processing and Updating Database...</div>"
|
||||
|
||||
if(0.2)
|
||||
dat += "<div class='statusDisplay'>SYSTEM LOCKED</div>"
|
||||
dat += "<A href='?src=\ref[src];lock=1.6'>Unlock</A>"
|
||||
|
||||
if(0.3)
|
||||
dat += "<div class='statusDisplay'>Constructing Prototype. Please Wait...</div>"
|
||||
|
||||
@@ -772,7 +762,6 @@ proc/CallMaterialName(ID)
|
||||
dat += "<A href='?src=\ref[src];togglesync=1'>Connect to Research Network</A><BR>"
|
||||
dat += "<span class='linkOn'>Disconnect from Research Network</span><BR>"
|
||||
dat += "<A href='?src=\ref[src];menu=1.7'>Device Linkage Menu</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];lock=0.2'>Lock Console</A><BR>"
|
||||
if(check_rights(R_ADMIN,0))
|
||||
dat += "<A href='?src=\ref[src];maxresearch=1'>\[ADMIN\] Maximize Research Levels</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];reset=1'>Reset R&D Database</A></div>"
|
||||
@@ -1164,14 +1153,24 @@ proc/CallMaterialName(ID)
|
||||
desc = "A console used to interface with R&D tools."
|
||||
id = 2
|
||||
req_access = list(access_robotics)
|
||||
circuit = /obj/item/weapon/circuitboard/rdconsole/robotics
|
||||
|
||||
/obj/machinery/computer/rdconsole/experiment
|
||||
name = "\improper E.X.P.E.R.I-MENTOR R&D console"
|
||||
desc = "A console used to interface with R&D tools."
|
||||
id = 3
|
||||
circuit = /obj/item/weapon/circuitboard/rdconsole/experiment
|
||||
|
||||
/obj/machinery/computer/rdconsole/mechanics
|
||||
name = "mechanics R&D console"
|
||||
desc = "A console used to interface with R&D tools."
|
||||
id = 4
|
||||
req_access = list(access_mechanic)
|
||||
circuit = /obj/item/weapon/circuitboard/rdconsole/mechanics
|
||||
|
||||
/obj/machinery/computer/rdconsole/public
|
||||
name = "public R&D console"
|
||||
desc = "A console used to interface with R&D tools."
|
||||
id = 5
|
||||
req_access = list()
|
||||
circuit = /obj/item/weapon/circuitboard/rdconsole/public
|
||||
|
||||
Reference in New Issue
Block a user