mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge pull request #484 from Markolie/nanoui
Camera consistency fixes round two, switch Keycard Authentication Device to NanoUI
This commit is contained in:
@@ -34,13 +34,10 @@
|
||||
name = "Circuit board (Message Monitor)"
|
||||
build_path = "/obj/machinery/computer/message_monitor"
|
||||
origin_tech = "programming=3"
|
||||
/obj/item/weapon/circuitboard/security
|
||||
name = "Circuit board (Security)"
|
||||
/obj/item/weapon/circuitboard/camera
|
||||
name = "Circuit board (Camera Monitor)"
|
||||
build_path = "/obj/machinery/computer/security"
|
||||
var/network = list("SS13")
|
||||
req_access = list(access_security)
|
||||
var/locked = 1
|
||||
var/emagged = 0
|
||||
origin_tech = "programming=2"
|
||||
/obj/item/weapon/circuitboard/aicore
|
||||
name = "Circuit board (AI core)"
|
||||
origin_tech = "programming=4;biotech=2"
|
||||
@@ -257,40 +254,6 @@
|
||||
user << "DERP! BUG! Report this (And what you were doing to cause it) to Agouri"
|
||||
return
|
||||
|
||||
/obj/item/weapon/circuitboard/security/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(emagged)
|
||||
user << "Circuit lock is already removed."
|
||||
return
|
||||
user << "\blue You override the circuit lock and open controls."
|
||||
emagged = 1
|
||||
locked = 0
|
||||
else if(istype(I,/obj/item/weapon/card/id))
|
||||
if(emagged)
|
||||
user << "\red Circuit lock does not respond."
|
||||
return
|
||||
if(check_access(I))
|
||||
locked = !locked
|
||||
user << "\blue You [locked ? "" : "un"]lock the circuit controls."
|
||||
else
|
||||
user << "\red Access denied."
|
||||
else if(istype(I,/obj/item/device/multitool))
|
||||
if(locked)
|
||||
user << "\red Circuit controls are locked."
|
||||
return
|
||||
var/existing_networks = list2text(network,",")
|
||||
var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
|
||||
if(!input)
|
||||
usr << "No input found please hang up and try your call again."
|
||||
return
|
||||
var/list/tempnetwork = text2list(input, ",")
|
||||
tempnetwork = difflist(tempnetwork,RESTRICTED_CAMERA_NETWORKS,1)
|
||||
if(tempnetwork.len < 1)
|
||||
usr << "No network found please hang up and try your call again."
|
||||
return
|
||||
network = tempnetwork
|
||||
return
|
||||
|
||||
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
|
||||
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.")
|
||||
@@ -407,10 +370,6 @@
|
||||
var/obj/machinery/computer/supplycomp/SC = B
|
||||
var/obj/item/weapon/circuitboard/supplycomp/C = circuit
|
||||
SC.can_order_contraband = C.contraband_enabled
|
||||
if(istype(circuit,/obj/item/weapon/circuitboard/security))
|
||||
var/obj/machinery/computer/security/C = B
|
||||
var/obj/item/weapon/circuitboard/security/CB = circuit
|
||||
C.network = CB.network
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
@@ -1,46 +1,131 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
|
||||
/obj/machinery/computer/security
|
||||
name = "Security Cameras"
|
||||
desc = "Used to access the various cameras on the station."
|
||||
name = "Camera Monitor"
|
||||
desc = "Used to access the various cameras networks on the station."
|
||||
icon_state = "cameras"
|
||||
circuit = "/obj/item/weapon/circuitboard/camera"
|
||||
var/obj/machinery/camera/current = null
|
||||
var/list/network = list("")
|
||||
var/last_pic = 1.0
|
||||
var/list/network = list("SS13")
|
||||
var/mapping = 0//For the overview file, interesting bit of code.
|
||||
|
||||
l_color = "#B40000"
|
||||
var/mapping = 0
|
||||
var/list/networks[0]
|
||||
var/list/tempnets[0]
|
||||
var/list/data[0]
|
||||
var/list/access[0]
|
||||
var/emag = 0
|
||||
|
||||
|
||||
New() // Lists existing networks and their required access. Format: networks[<name>] = list(<access>)
|
||||
networks["SS13"] = list(access_hos,access_captain)
|
||||
networks["Telecomms"] = list(access_hos,access_captain)
|
||||
networks["Research Outpost"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Mining Outpost"] = list(access_qm,access_hop,access_hos,access_captain)
|
||||
networks["Research"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Prison"] = list(access_hos,access_captain)
|
||||
networks["Interrogation"] = list(access_hos,access_captain)
|
||||
networks["Supermatter"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Singularity"] = list(access_ce,access_hos,access_captain)
|
||||
networks["Anomaly Isolation"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Toxins"] = list(access_rd,access_hos,access_captain)
|
||||
networks["Telepad"] = list(access_rd,access_hos,access_captain)
|
||||
networks["CentCom"] = list(access_cent_captain)
|
||||
networks["Thunderdome"] = list(access_cent_captain)
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
return ui_interact(user)
|
||||
|
||||
attack_paw(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
check_eye(var/mob/user as mob)
|
||||
if ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon)))
|
||||
return null
|
||||
user.reset_view(current)
|
||||
return 1
|
||||
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
|
||||
// Network configuration
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag)) // If hit by an emag.
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(!emag)
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
emag = 1
|
||||
user << "\blue You have authorized full network access!"
|
||||
ui_interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
else
|
||||
ui_interact(user)
|
||||
else if(istype(I,/obj/item/weapon/card/id)) // If hit by a regular ID card.
|
||||
var/obj/item/weapon/card/id/E = I
|
||||
access = E.access
|
||||
ui_interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
data.Cut()
|
||||
tempnets.Cut()
|
||||
if(emag)
|
||||
access = list(access_captain) // Assume captain level access when emagged
|
||||
data["emagged"] = 1
|
||||
if(isAI(user))
|
||||
access = list(access_captain) // Assume captain level access when AI
|
||||
// Loop through the ID's permission, and check which networks the ID has access to.
|
||||
for(var/l in networks) // Loop through networks.
|
||||
for(var/m in networks[l]) // Loop through access levels of the networks.
|
||||
if(m in access)
|
||||
if(l in network) // Checks if the network is currently active.
|
||||
tempnets.Add(list(list("name" = l, "active" = 1)))
|
||||
else
|
||||
tempnets.Add(list(list("name" = l, "active" = 0)))
|
||||
break
|
||||
data["networks"] = tempnets
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "camera_console.tmpl", "Camera Monitor UI", 660, 280)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["activate"]) // Activate: enable or disable networks
|
||||
var/net = href_list["activate"] // Network to be enabled or disabled.
|
||||
var/active = href_list["active"] // Is the network currently active.
|
||||
for(var/a in networks[net])
|
||||
if(a in access) // Re-check for authorization.
|
||||
if(text2num(active) == 1)
|
||||
src.network -= net
|
||||
break
|
||||
else
|
||||
src.network += net
|
||||
break
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
attack_hand(var/mob/user as mob)
|
||||
if(src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection:</b> \black You're too far away from the station!"
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
|
||||
if(!isAI(user))
|
||||
user.set_machine(src)
|
||||
|
||||
|
||||
if(network.len == 0)
|
||||
user << "\red No networks configured! Swipe the monitor with an authorized ID to configure them."
|
||||
return
|
||||
|
||||
// Camera listing
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in cameranet.viewpoints)
|
||||
L.Add(C)
|
||||
|
||||
camera_sort(L)
|
||||
|
||||
var/list/D = list()
|
||||
@@ -55,7 +140,7 @@
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = D[t]
|
||||
|
||||
|
||||
if(t == "Cancel")
|
||||
user.unset_machine()
|
||||
return 0
|
||||
@@ -66,13 +151,15 @@
|
||||
spawn(5)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
// Check if camera is accessible when jumping
|
||||
proc/can_access_camera(var/obj/machinery/camera/C)
|
||||
var/list/shared_networks = src.network & C.network
|
||||
if(shared_networks.len)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
// Switching to cameras
|
||||
proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
|
||||
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.can_use() )) && (!istype(user, /mob/living/silicon/ai)))
|
||||
if(!C.can_use() && !isAI(user))
|
||||
@@ -88,40 +175,7 @@
|
||||
use_power(50)
|
||||
return 1
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/structure/computerframe/CF = new /obj/structure/computerframe(loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
var/obj/item/weapon/circuitboard/security/CB = new /obj/item/weapon/circuitboard/security(CF)
|
||||
CB.network = network
|
||||
for (var/obj/C in src)
|
||||
C.loc = loc
|
||||
CF.circuit = CB
|
||||
CF.state = 3
|
||||
CF.icon_state = "3"
|
||||
CF.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/CF = new /obj/structure/computerframe( loc )
|
||||
var/obj/item/weapon/circuitboard/security/CB = new /obj/item/weapon/circuitboard/security(CF)
|
||||
CB.network = network
|
||||
for (var/obj/C in src)
|
||||
C.loc = loc
|
||||
CF.circuit = CB
|
||||
CF.state = 4
|
||||
CF.icon_state = "4"
|
||||
CF.anchored = 1
|
||||
del(src)
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
//Camera control: moving.
|
||||
//Camera control: moving.
|
||||
proc/jump_on_click(var/mob/user,var/A)
|
||||
if(user.machine != src)
|
||||
return
|
||||
@@ -150,13 +204,15 @@
|
||||
return
|
||||
if(can_access_camera(jump_to))
|
||||
switch_to_camera(user,jump_to)
|
||||
//Camera control: mouse.
|
||||
|
||||
// Camera control: mouse.
|
||||
/atom/DblClick()
|
||||
..()
|
||||
if(istype(usr.machine,/obj/machinery/computer/security))
|
||||
var/obj/machinery/computer/security/console = usr.machine
|
||||
console.jump_on_click(usr,src)
|
||||
//Camera control: arrow keys.
|
||||
|
||||
// Camera control: arrow keys.
|
||||
/mob/Move(n,direct)
|
||||
if(istype(machine,/obj/machinery/computer/security))
|
||||
var/obj/machinery/computer/security/console = machine
|
||||
@@ -167,12 +223,13 @@
|
||||
return
|
||||
return ..(n,direct)
|
||||
|
||||
// Other computer monitors.
|
||||
/obj/machinery/computer/security/telescreen
|
||||
name = "Telescreen"
|
||||
desc = "Used for watching an empty arena."
|
||||
desc = "Used for watching camera networks."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "telescreen"
|
||||
network = list("thunder")
|
||||
network = list("SS13")
|
||||
density = 0
|
||||
|
||||
/obj/machinery/computer/security/telescreen/update_icon()
|
||||
@@ -182,27 +239,26 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment
|
||||
name = "entertainment monitor"
|
||||
desc = "Damn, they better have /tg/thechannel on these things."
|
||||
name = "Entertainment Monitor"
|
||||
desc = "Damn, they better have Paradise TV on these things."
|
||||
icon = 'icons/obj/status_display.dmi'
|
||||
icon_state = "entertainment"
|
||||
network = list("news")
|
||||
|
||||
/obj/machinery/computer/security/wooden_tv
|
||||
name = "Security Cameras"
|
||||
name = "Security Camera Monitor"
|
||||
desc = "An old TV hooked into the stations camera network."
|
||||
icon_state = "security_det"
|
||||
network = list("news")
|
||||
|
||||
network = list("SS13")
|
||||
|
||||
/obj/machinery/computer/security/mining
|
||||
name = "Outpost Cameras"
|
||||
name = "Outpost Camera Monitor"
|
||||
desc = "Used to access the various cameras on the outpost."
|
||||
icon_state = "miningcameras"
|
||||
network = list("MINE")
|
||||
network = list("Mining Outpost")
|
||||
|
||||
/obj/machinery/computer/security/engineering
|
||||
name = "Engineering Cameras"
|
||||
name = "Engineering Camera Monitor"
|
||||
desc = "Used to monitor fires and breaches."
|
||||
icon_state = "engineeringcameras"
|
||||
network = list("Engineering","Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
network = list("Engineering","Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
@@ -1,127 +0,0 @@
|
||||
|
||||
//the researchable camera circuit that can connect to any camera network
|
||||
|
||||
/obj/item/weapon/circuitboard/camera
|
||||
//name = "Circuit board (Camera)"
|
||||
var/secured = 1
|
||||
var/authorised = 0
|
||||
var/possibleNets[0]
|
||||
var/network = ""
|
||||
build_path = 0
|
||||
|
||||
//when adding a new camera network, you should only need to update these two procs
|
||||
New()
|
||||
possibleNets["Engineering"] = access_ce
|
||||
possibleNets["SS13"] = access_hos
|
||||
possibleNets["Mining"] = access_mining
|
||||
possibleNets["Cargo"] = access_qm
|
||||
possibleNets["Research"] = access_rd
|
||||
possibleNets["Medbay"] = access_cmo
|
||||
|
||||
proc/updateBuildPath()
|
||||
build_path = ""
|
||||
if(authorised && secured)
|
||||
switch(network)
|
||||
if("SS13")
|
||||
build_path = "/obj/machinery/computer/security"
|
||||
if("Engineering")
|
||||
build_path = "/obj/machinery/computer/security/engineering"
|
||||
if("Mining")
|
||||
build_path = "/obj/machinery/computer/security/mining"
|
||||
if("Research")
|
||||
build_path = "/obj/machinery/computer/security/research"
|
||||
if("Medbay")
|
||||
build_path = "/obj/machinery/computer/security/medbay"
|
||||
if("Cargo")
|
||||
build_path = "/obj/machinery/computer/security/cargo"
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)//if(health > 50)
|
||||
..()
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(network)
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
else
|
||||
return
|
||||
authorised = 1
|
||||
user << "\blue You authorised the circuit network!"
|
||||
updateDialog()
|
||||
else
|
||||
user << "\blue You must select a camera network circuit!"
|
||||
else if(istype(I,/obj/item/weapon/screwdriver))
|
||||
secured = !secured
|
||||
user.visible_message("\blue The [src] can [secured ? "no longer" : "now"] be modified.")
|
||||
updateBuildPath()
|
||||
return
|
||||
|
||||
attack_self(var/mob/user)
|
||||
if(!secured && ishuman(user))
|
||||
user.machine = src
|
||||
interact(user, 0)
|
||||
|
||||
proc/interact(var/mob/user, var/ai=0)
|
||||
if(secured)
|
||||
return
|
||||
if (!ishuman(user))
|
||||
return ..(user)
|
||||
var/t = "<B>Circuitboard Console - Camera Monitoring Computer</B><BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
t += "<hr> Please select a camera network:<br>"
|
||||
|
||||
for(var/curNet in possibleNets)
|
||||
if(network == curNet)
|
||||
t += "- [curNet]<br>"
|
||||
else
|
||||
t += "- <A href='?src=\ref[src];net=[curNet]'>[curNet]</A><BR>"
|
||||
t += "<hr>"
|
||||
if(network)
|
||||
if(authorised)
|
||||
t += "Authenticated <A href='?src=\ref[src];removeauth=1'>(Clear Auth)</A><BR>"
|
||||
else
|
||||
t += "<A href='?src=\ref[src];auth=1'><b>*Authenticate*</b></A> (Requires an appropriate access ID)<br>"
|
||||
else
|
||||
t += "<A href='?src=\ref[src];auth=1'>*Authenticate*</A> (Requires an appropriate access ID)<BR>"
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
|
||||
user << browse(t, "window=camcircuit;size=500x400")
|
||||
onclose(user, "camcircuit")
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if( href_list["close"] )
|
||||
usr << browse(null, "window=camcircuit")
|
||||
usr.machine = null
|
||||
return
|
||||
else if(href_list["net"])
|
||||
network = href_list["net"]
|
||||
authorised = 0
|
||||
else if( href_list["auth"] )
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.equipped()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if (I && istype(I))
|
||||
if(access_captain in I.access)
|
||||
authorised = 1
|
||||
else if (possibleNets[network] in I.access)
|
||||
authorised = 1
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if(network)
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
if(E.uses)
|
||||
E.uses--
|
||||
else
|
||||
return
|
||||
authorised = 1
|
||||
usr << "\blue You authorised the circuit network!"
|
||||
updateDialog()
|
||||
else
|
||||
usr << "\blue You must select a camera network circuit!"
|
||||
else if( href_list["removeauth"] )
|
||||
authorised = 0
|
||||
updateDialog()
|
||||
|
||||
updateDialog()
|
||||
if(istype(src.loc,/mob))
|
||||
attack_self(src.loc)
|
||||
@@ -1,75 +0,0 @@
|
||||
|
||||
/obj/machinery/computer/security
|
||||
|
||||
l_color = "#B40000"
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
New()
|
||||
if(network)
|
||||
networks = list(network)
|
||||
else
|
||||
switch(department)
|
||||
if("Security")
|
||||
networks = list("Arrivals","SS13","Engineering","Research","Medbay","Tcomsat","Mess Hall","Security","Prison Wing","Atmospherics","Cargo","Command","Solars","Robotics","Chapel","Hydroponics", "Dormitory","Theatre","Library")
|
||||
if("Engineering")
|
||||
networks = list("Engineering","Tcomsat","Singularity","Atmospherics","Solars","Robotics")
|
||||
if("Research")
|
||||
networks = list("Research","Bomb Testing","Outpost")
|
||||
if("Medbay")
|
||||
networks = list("Medbay")
|
||||
if("Cargo")
|
||||
networks = list("Mine","Cargo")
|
||||
if("Mining")
|
||||
networks = list("Mine")
|
||||
if("Thunderdome")
|
||||
networks = list("thunder")
|
||||
if("CREED")
|
||||
networks = list("CREED")
|
||||
|
||||
/obj/machinery/computer/security/attack_hand(var/mob/user as mob)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
if(src.current)
|
||||
user.reset_view(src.current)
|
||||
|
||||
var/list/L = new/list
|
||||
for (var/obj/machinery/camera/C in world)
|
||||
L.Add(C)
|
||||
|
||||
camera_network_sort(L)
|
||||
|
||||
var/list/D = new()
|
||||
D["Cancel"] = "Cancel"
|
||||
for (var/obj/machinery/camera/C in L)
|
||||
if ( C.network in src.networks )
|
||||
D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
|
||||
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in D
|
||||
|
||||
if(!t)
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = D[t]
|
||||
|
||||
if (t == "Cancel")
|
||||
user.cancel_camera()
|
||||
return 0
|
||||
|
||||
if (C)
|
||||
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/living/silicon/ai)))
|
||||
return 0
|
||||
else
|
||||
src.current = C
|
||||
use_power(50)
|
||||
user.reset_view(C)
|
||||
|
||||
spawn( 5 )
|
||||
attack_hand(user)
|
||||
@@ -70,13 +70,13 @@ datum/design/proc/CalcReliability(var/list/temp_techs)
|
||||
///////////////////Computer Boards///////////////////////////////////
|
||||
|
||||
datum/design/seccamera
|
||||
name = "Circuit Design (Security)"
|
||||
desc = "Allows for the construction of circuit boards used to build security camera computers."
|
||||
name = "Circuit Design (Camera Monitor)"
|
||||
desc = "Allows for the construction of circuit boards used to build camera monitors."
|
||||
id = "seccamera"
|
||||
req_tech = list("programming" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 2000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/security"
|
||||
build_path = "/obj/item/weapon/circuitboard/camera"
|
||||
|
||||
datum/design/aicore
|
||||
name = "Circuit Design (AI Core)"
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/keycard_auth/attack_hand(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/keycard_auth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||
user << "This device is not powered."
|
||||
return
|
||||
@@ -60,30 +63,21 @@
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "<h1>Keycard Authentication Device</h1>"
|
||||
|
||||
dat += "This device is used to trigger some high security events. It requires the simultaneous swipe of two high-level ID cards."
|
||||
dat += "<br><hr><br>"
|
||||
|
||||
if(screen == 1)
|
||||
dat += "Select an event to trigger:<ul>"
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Red alert'>Red alert</A></li>"
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Emergency Response Team'>Emergency Response Team</A></li>"
|
||||
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Grant Emergency Maintenance Access'>Grant Emergency Maintenance Access</A></li>"
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Revoke Emergency Maintenance Access'>Revoke Emergency Maintenance Access</A></li>"
|
||||
dat += "</ul>"
|
||||
user << browse(dat, "window=keycard_auth;size=500x250")
|
||||
if(screen == 2)
|
||||
dat += "Please swipe your card to authorize the following event: <b>[event]</b>"
|
||||
dat += "<p><A href='?src=\ref[src];reset=1'>Back</A>"
|
||||
user << browse(dat, "window=keycard_auth;size=500x250")
|
||||
return
|
||||
|
||||
|
||||
var/data[0]
|
||||
data["screen"] = screen
|
||||
data["event"] = event
|
||||
data["src"] = "\ref[src]"
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 520, 260)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/keycard_auth/Topic(href, href_list)
|
||||
..()
|
||||
if(..())
|
||||
return
|
||||
if(busy)
|
||||
usr << "This device is busy."
|
||||
return
|
||||
@@ -96,7 +90,7 @@
|
||||
if(href_list["reset"])
|
||||
reset()
|
||||
|
||||
updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
@@ -143,7 +137,7 @@
|
||||
|
||||
/obj/machinery/keycard_auth/proc/trigger_event()
|
||||
switch(event)
|
||||
if("Red alert")
|
||||
if("Red Alert")
|
||||
set_security_level(SEC_LEVEL_RED)
|
||||
feedback_inc("alert_keycard_auth_red",1)
|
||||
if("Grant Emergency Maintenance Access")
|
||||
|
||||
+3
-3
@@ -784,9 +784,9 @@ var/list/cheartstopper = list("potassium_chloride") //this stops the heart when
|
||||
#define GETPULSE_TOOL 1 //more accurate (med scanner, sleeper, etc)
|
||||
|
||||
var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them.
|
||||
"thunder",
|
||||
"ERT",
|
||||
"NUKE"
|
||||
"CentCom",
|
||||
"Thunderdome",
|
||||
"Xeno"
|
||||
)
|
||||
|
||||
//Species flags.
|
||||
|
||||
+309
-307
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
<!--
|
||||
Title: Camera Monitor UI
|
||||
Used In File(s): \code\game\machinery\computer\camera.dm
|
||||
-->
|
||||
<div class="item">
|
||||
<h2>Networks</h2>
|
||||
Please select the networks you'd like this console to monitor.
|
||||
{{if data.emagged}}
|
||||
<div class="bad">WARNING: Unauthorized access detected.</div>
|
||||
{{/if}}
|
||||
<div class="item">
|
||||
{{for data.networks}}
|
||||
{{:helper.link(value.name, value.active ? 'minus' : 'plus', { 'activate' : value.name, 'active' : value.active }, '', value.active ? 'linkOn' : '')}}
|
||||
{{empty}}
|
||||
<div class="bad">No accessible networks were found. Please make sure your ID has sufficient access.</div>
|
||||
{{/for}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
Title: Keycard Authentication Device UI
|
||||
Used In File(s): \code\modules\security_levels\keycard_authentication.dm
|
||||
-->
|
||||
<div class="item">
|
||||
<h1>Keycard Authentication Device</h1>
|
||||
This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards.
|
||||
<div class="item">
|
||||
{{if data.screen == 1}}
|
||||
<h2>Trigger Event</h2>
|
||||
<div class="itemContents">
|
||||
{{:helper.link('Red Alert', 'alert', { 'triggerevent' : 'Red Alert', 'source' : data.src })}}
|
||||
{{:helper.link('Emergency Response Team', 'alert', { 'triggerevent' : 'Emergency Response Team', 'source' : data.src })}}
|
||||
</div>
|
||||
<div style="margin-top: 10px;" class="itemContents">
|
||||
{{:helper.link('Grant Emergency Maintenance Access', 'unlocked', { 'triggerevent' : 'Grant Emergency Maintenance Access', 'source' : data.src })}}
|
||||
{{:helper.link('Revoke Emergency Maintenance Access', 'locked', { 'triggerevent' : 'Revoke Emergency Maintenance Access', 'source' : data.src })}}
|
||||
</div>
|
||||
{{else data.screen == 2}}
|
||||
<h2>Please swipe your card to authorize the following event:</h2>
|
||||
<div style="text-align: center; font-size: 16px; font-weight: bold;">{{:data.event}}</div>
|
||||
{{:helper.link('Back', 'close', { 'reset' : 1 })}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user