mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-14 17:36:52 +01:00
a small addition
This commit is contained in:
@@ -40,10 +40,10 @@
|
||||
|
||||
/datum/nano_module/camera_monitor
|
||||
name = "Camera Monitoring program"
|
||||
var/obj/machinery/camera/current_camera = null
|
||||
var/current_network = null
|
||||
var/obj/machinery/camera/current_camera
|
||||
var/current_network
|
||||
|
||||
/datum/nano_module/camera_monitor/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, state = default_state)
|
||||
/datum/nano_module/camera_monitor/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = TRUE, state = default_state)
|
||||
var/list/data = host.initial_data()
|
||||
|
||||
data["current_camera"] = current_camera ? current_camera.nano_structure() : null
|
||||
|
||||
@@ -9,20 +9,20 @@
|
||||
available_on_ntnet = TRUE
|
||||
required_access_download = access_hos
|
||||
required_access_run = access_security
|
||||
nanomodule_path = /datum/nano_module/program/digitalwarrant/
|
||||
nanomodule_path = /datum/nano_module/program/digitalwarrant
|
||||
|
||||
/datum/nano_module/program/digitalwarrant/
|
||||
/datum/nano_module/program/digitalwarrant
|
||||
name = "Warrant Assistant"
|
||||
var/datum/record/warrant/activewarrant
|
||||
var/datum/record/warrant/active_warrant
|
||||
|
||||
/datum/nano_module/program/digitalwarrant/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
|
||||
var/list/data = host.initial_data()
|
||||
|
||||
if(activewarrant)
|
||||
data["warrantname"] = activewarrant.name
|
||||
data["warrantcharges"] = activewarrant.notes
|
||||
data["warrantauth"] = activewarrant.authorization
|
||||
data["type"] = activewarrant.wtype
|
||||
if(active_warrant)
|
||||
data["warrantname"] = active_warrant.name
|
||||
data["warrantcharges"] = active_warrant.notes
|
||||
data["warrantauth"] = active_warrant.authorization
|
||||
data["type"] = active_warrant.wtype
|
||||
else
|
||||
var/list/allwarrants = list()
|
||||
for(var/datum/record/warrant/W in SSrecords.warrants)
|
||||
@@ -47,13 +47,13 @@
|
||||
return TRUE
|
||||
|
||||
if(href_list["sw_menu"])
|
||||
activewarrant = null
|
||||
active_warrant = null
|
||||
|
||||
if(href_list["editwarrant"])
|
||||
. = TRUE
|
||||
for(var/datum/record/warrant/W in SSrecords.warrants)
|
||||
if(W.id == text2num(href_list["editwarrant"]))
|
||||
activewarrant = W
|
||||
active_warrant = W
|
||||
break
|
||||
|
||||
// The following actions will only be possible if the user has an ID with security access equipped. This is in line with modular computer framework's authentication methods,
|
||||
@@ -64,13 +64,13 @@
|
||||
return
|
||||
var/obj/item/card/id/I = user.GetIdCard()
|
||||
if(!istype(I) || !I.registered_name || !(access_armory in I.access) || issilicon(user))
|
||||
to_chat(user, "Authentication error: Unable to locate ID with appropriate access to allow this operation.")
|
||||
to_chat(user, SPAN_WARNING("Authentication error: Unable to locate ID with appropriate access to allow this operation."))
|
||||
return
|
||||
|
||||
if(href_list["addwarrant"])
|
||||
. = TRUE
|
||||
var/datum/record/warrant/W = new()
|
||||
var/temp = sanitize(input(usr, "Do you want to create a search-, or an arrest warrant?") as null|anything in list("search","arrest"))
|
||||
var/temp = sanitize(input(usr, "Do you want to create a search-, or an arrest warrant?") as null|anything in list("search", "arrest"))
|
||||
if(CanInteract(user, default_state))
|
||||
if(temp == "arrest")
|
||||
W.name = "Unknown"
|
||||
@@ -82,17 +82,17 @@
|
||||
W.notes = "No reason given"
|
||||
W.authorization = "Unauthorized"
|
||||
W.wtype = "search"
|
||||
activewarrant = W
|
||||
active_warrant = W
|
||||
|
||||
if(href_list["savewarrant"])
|
||||
. = TRUE
|
||||
SSrecords.update_record(activewarrant)
|
||||
activewarrant = null
|
||||
SSrecords.update_record(active_warrant)
|
||||
active_warrant = null
|
||||
|
||||
if(href_list["deletewarrant"])
|
||||
. = TRUE
|
||||
SSrecords.remove_record(activewarrant)
|
||||
activewarrant = null
|
||||
SSrecords.remove_record(active_warrant)
|
||||
active_warrant = null
|
||||
|
||||
if(href_list["editwarrantname"])
|
||||
. = TRUE
|
||||
@@ -103,7 +103,7 @@
|
||||
if(CanInteract(user, default_state))
|
||||
if (!new_name)
|
||||
return
|
||||
activewarrant.name = new_name
|
||||
active_warrant.name = new_name
|
||||
|
||||
if(href_list["editwarrantnamecustom"])
|
||||
. = TRUE
|
||||
@@ -111,21 +111,21 @@
|
||||
if(CanInteract(user, default_state))
|
||||
if (!new_name)
|
||||
return
|
||||
activewarrant.name = new_name
|
||||
active_warrant.name = new_name
|
||||
|
||||
if(href_list["editwarrantcharges"])
|
||||
. = TRUE
|
||||
var/new_charges = sanitize(input("Please input charges", "Charges", activewarrant.notes) as null|text)
|
||||
var/new_charges = sanitize(input("Please input charges", "Charges", active_warrant.notes) as null|text)
|
||||
if(CanInteract(user, default_state))
|
||||
if (!new_charges)
|
||||
return
|
||||
activewarrant.notes = new_charges
|
||||
active_warrant.notes = new_charges
|
||||
|
||||
if(href_list["editwarrantauth"])
|
||||
. = TRUE
|
||||
|
||||
activewarrant.authorization = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]"
|
||||
active_warrant.authorization = "[I.registered_name] - [I.assignment ? I.assignment : "(Unknown)"]"
|
||||
|
||||
if(href_list["back"])
|
||||
. = TRUE
|
||||
activewarrant = null
|
||||
active_warrant = null
|
||||
@@ -1,13 +1,13 @@
|
||||
/datum/computer_file/program/penal_mechs
|
||||
filename = "penalmechs"
|
||||
filename = "penalrobotics"
|
||||
filedesc = "Remote Penal Monitoring"
|
||||
program_icon_state = "security"
|
||||
extended_desc = "This program allows monitoring and control of active penal miner mechs."
|
||||
extended_desc = "This program allows monitoring and control of active penal robotics."
|
||||
required_access_run = access_armory
|
||||
required_access_download = access_armory
|
||||
requires_ntnet = 1
|
||||
available_on_ntnet = 1
|
||||
network_destination = "penal mining mech monitoring system"
|
||||
requires_ntnet = TRUE
|
||||
available_on_ntnet = TRUE
|
||||
network_destination = "penal robotics monitoring system"
|
||||
size = 11
|
||||
usage_flags = PROGRAM_ALL_REGULAR
|
||||
color = LIGHT_COLOR_ORANGE
|
||||
@@ -18,7 +18,7 @@
|
||||
var/datum/vueui/ui = SSvueui.get_open_ui(user, src)
|
||||
if (!ui)
|
||||
ui = new /datum/vueui/modularcomputer(user, src, "mcomputer-security-penalcontroller", 500, 400, "Penal Mech Monitoring")
|
||||
ui.auto_update_content = 1
|
||||
ui.auto_update_content = TRUE
|
||||
ui.open()
|
||||
|
||||
/datum/computer_file/program/penal_mechs/vueui_transfer(oldobj)
|
||||
@@ -26,7 +26,7 @@
|
||||
var/datum/vueui/ui = o
|
||||
// Let's ensure our ui's autoupdate after transfer.
|
||||
// TODO: revert this value on transfer out.
|
||||
ui.auto_update_content = 1
|
||||
ui.auto_update_content = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/penal_mechs/vueui_data_change(var/list/data, var/mob/user, var/datum/vueui/ui)
|
||||
@@ -167,6 +167,6 @@
|
||||
if(!current_camera)
|
||||
return FALSE
|
||||
var/viewflag = current_camera.check_eye(user)
|
||||
if ( viewflag < 0 ) //camera doesn't work
|
||||
if(viewflag < 0) //camera doesn't work
|
||||
reset_current()
|
||||
return viewflag
|
||||
Reference in New Issue
Block a user