mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
The Science Hub app for research is now available for science employees in addition to heads of staff. (#65035)
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
filetype = "PRG"
|
||||
/// File name. FILE NAME MUST BE UNIQUE IF YOU WANT THE PROGRAM TO BE DOWNLOADABLE FROM NTNET!
|
||||
filename = "UnknownProgram"
|
||||
/// List of required accesses to *run* the program.
|
||||
var/required_access = null
|
||||
/// List of required access to download or file host the program
|
||||
var/transfer_access = null
|
||||
/// List of required accesses to *run* the program. Any match will do.
|
||||
var/list/required_access = list()
|
||||
/// List of required access to download or file host the program. Any match will do.
|
||||
var/list/transfer_access = list()
|
||||
/// PROGRAM_STATE_KILLED or PROGRAM_STATE_BACKGROUND or PROGRAM_STATE_ACTIVE - specifies whether this program is running.
|
||||
var/program_state = PROGRAM_STATE_KILLED
|
||||
/// Device that runs this program.
|
||||
@@ -106,7 +106,7 @@
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
*Check if the user can run program. Only humans can operate computer. Automatically called in run_program()
|
||||
*Check if the user can run program. Only humans and silicons can operate computer. Automatically called in run_program()
|
||||
*ID must be inserted into a card slot to be read. If the program is not currently installed (as is the case when
|
||||
*NT Software Hub is checking available software), a list can be given to be used instead.
|
||||
*Arguments:
|
||||
@@ -117,39 +117,41 @@
|
||||
*access can contain a list of access numbers to check against. If access is not empty, it will be used istead of checking any inserted ID.
|
||||
*/
|
||||
/datum/computer_file/program/proc/can_run(mob/user, loud = FALSE, access_to_check, transfer = FALSE, list/access)
|
||||
// Defaults to required_access
|
||||
if(!access_to_check)
|
||||
if(transfer && transfer_access)
|
||||
access_to_check = transfer_access
|
||||
else
|
||||
access_to_check = required_access
|
||||
if(!access_to_check) // No required_access, allow it.
|
||||
return TRUE
|
||||
|
||||
if(!transfer && computer && (computer.obj_flags & EMAGGED)) //emags can bypass the execution locks but not the download ones.
|
||||
if(issilicon(user))
|
||||
return TRUE
|
||||
|
||||
if(isAdminGhostAI(user))
|
||||
return TRUE
|
||||
|
||||
if(issilicon(user))
|
||||
if(!transfer && computer && (computer.obj_flags & EMAGGED)) //emags can bypass the execution locks but not the download ones.
|
||||
return TRUE
|
||||
|
||||
// Defaults to required_access
|
||||
if(!access_to_check)
|
||||
if(transfer && length(transfer_access))
|
||||
access_to_check = transfer_access
|
||||
else
|
||||
access_to_check = required_access
|
||||
if(!length(access_to_check)) // No required_access, allow it.
|
||||
return TRUE
|
||||
|
||||
if(!length(access))
|
||||
var/obj/item/card/id/D
|
||||
var/obj/item/card/id/accesscard
|
||||
var/obj/item/computer_hardware/card_slot/card_slot
|
||||
if(computer)
|
||||
card_slot = computer.all_components[MC_CARD]
|
||||
D = card_slot?.GetID()
|
||||
accesscard = card_slot?.GetID()
|
||||
|
||||
if(!D)
|
||||
if(!accesscard)
|
||||
if(loud)
|
||||
to_chat(user, span_danger("\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning."))
|
||||
return FALSE
|
||||
access = D.GetAccess()
|
||||
access = accesscard.GetAccess()
|
||||
|
||||
for(var/singular_access in access_to_check)
|
||||
if(singular_access in access) //For loop checks every individual access entry in the access list. If the user's ID has access to any entry, then we're good.
|
||||
return TRUE
|
||||
|
||||
if(access_to_check in access)
|
||||
return TRUE
|
||||
if(loud)
|
||||
to_chat(user, span_danger("\The [computer] flashes an \"Access Denied\" warning."))
|
||||
return FALSE
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
size = 12
|
||||
requires_ntnet = FALSE
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
transfer_access = ACCESS_HEADS
|
||||
transfer_access = list(ACCESS_HEADS)
|
||||
available_on_ntnet = TRUE
|
||||
tgui_id = "NtosAiRestorer"
|
||||
program_icon = "laptop-code"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
program_icon_state = "generic"
|
||||
extended_desc = "This program allows for remote monitoring of station cyborgs."
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = ACCESS_ROBOTICS
|
||||
transfer_access = list(ACCESS_ROBOTICS)
|
||||
size = 5
|
||||
tgui_id = "NtosCyborgRemoteMonitor"
|
||||
program_icon = "project-diagram"
|
||||
@@ -169,7 +169,7 @@
|
||||
requires_ntnet = FALSE
|
||||
available_on_ntnet = FALSE
|
||||
available_on_syndinet = TRUE
|
||||
transfer_access = null
|
||||
transfer_access = list()
|
||||
tgui_id = "NtosCyborgRemoteMonitorSyndicate"
|
||||
|
||||
/datum/computer_file/program/borg_monitor/syndicate/run_emag()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
category = PROGRAM_CATEGORY_CREW
|
||||
program_icon_state = "id"
|
||||
extended_desc = "Program for programming employee ID cards to access parts of the station."
|
||||
transfer_access = ACCESS_HEADS
|
||||
transfer_access = list(ACCESS_HEADS)
|
||||
requires_ntnet = 0
|
||||
size = 8
|
||||
tgui_id = "NtosCard"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
category = PROGRAM_CATEGORY_CREW
|
||||
program_icon_state = "id"
|
||||
extended_desc = "Program for viewing and printing the current crew manifest"
|
||||
transfer_access = ACCESS_HEADS
|
||||
transfer_access = list(ACCESS_HEADS)
|
||||
requires_ntnet = TRUE
|
||||
size = 4
|
||||
tgui_id = "NtosCrewManifest"
|
||||
|
||||
@@ -7,7 +7,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
category = PROGRAM_CATEGORY_CREW
|
||||
program_icon_state = "id"
|
||||
extended_desc = "Program for viewing and changing job slot availability."
|
||||
transfer_access = ACCESS_HEADS
|
||||
transfer_access = list(ACCESS_HEADS)
|
||||
requires_ntnet = TRUE
|
||||
size = 4
|
||||
tgui_id = "NtosJobManager"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
extended_desc = "This program monitors stationwide NTNet network, provides access to logging systems, and allows for configuration changes"
|
||||
size = 12
|
||||
requires_ntnet = TRUE
|
||||
required_access = ACCESS_NETWORK //NETWORK CONTROL IS A MORE SECURE PROGRAM.
|
||||
required_access = list(ACCESS_NETWORK) //NETWORK CONTROL IS A MORE SECURE PROGRAM.
|
||||
available_on_ntnet = TRUE
|
||||
tgui_id = "NtosNetMonitor"
|
||||
program_icon = "network-wired"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
category = PROGRAM_CATEGORY_CREW
|
||||
program_icon_state = "dummy"
|
||||
extended_desc = "This program connects to a Spinward Sector community art site for viewing and printing art."
|
||||
transfer_access = ACCESS_LIBRARY
|
||||
transfer_access = list(ACCESS_LIBRARY)
|
||||
usage_flags = PROGRAM_CONSOLE
|
||||
requires_ntnet = TRUE
|
||||
size = 9
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
program_icon_state = "power_monitor"
|
||||
extended_desc = "This program connects to sensors around the station to provide information about electrical systems"
|
||||
ui_header = "power_norm.gif"
|
||||
transfer_access = ACCESS_ENGINE
|
||||
transfer_access = list(ACCESS_ENGINE)
|
||||
usage_flags = PROGRAM_CONSOLE
|
||||
requires_ntnet = 0
|
||||
size = 9
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
ui_header = "borg_mon.gif" //DEBUG -- new icon before PR
|
||||
program_icon_state = "radarntos"
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = null
|
||||
available_on_ntnet = FALSE
|
||||
usage_flags = PROGRAM_LAPTOP | PROGRAM_TABLET
|
||||
size = 5
|
||||
@@ -212,7 +211,7 @@
|
||||
filedesc = "Lifeline"
|
||||
extended_desc = "This program allows for tracking of crew members via their suit sensors."
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = ACCESS_MEDICAL
|
||||
transfer_access = list(ACCESS_MEDICAL)
|
||||
available_on_ntnet = TRUE
|
||||
program_icon = "heartbeat"
|
||||
|
||||
@@ -261,7 +260,6 @@
|
||||
program_icon_state = "radarsyndicate"
|
||||
extended_desc = "This program allows for tracking of nuclear authorization disks and warheads."
|
||||
requires_ntnet = FALSE
|
||||
transfer_access = null
|
||||
available_on_ntnet = FALSE
|
||||
available_on_syndinet = TRUE
|
||||
tgui_id = "NtosRadarSyndicate"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
category = PROGRAM_CATEGORY_SCI
|
||||
program_icon_state = "robot"
|
||||
extended_desc = "A remote controller used for giving basic commands to non-sentient robots."
|
||||
transfer_access = null
|
||||
requires_ntnet = TRUE
|
||||
size = 12
|
||||
tgui_id = "NtosRoboControl"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
ui_header = "robotact.gif" //DEBUG -- new icon before PR
|
||||
program_icon_state = "command"
|
||||
requires_ntnet = FALSE
|
||||
transfer_access = null
|
||||
available_on_ntnet = FALSE
|
||||
unsendable = TRUE
|
||||
undeletable = TRUE
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
program_icon_state = "generic"
|
||||
extended_desc = "This program allows access to standard security camera networks."
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = ACCESS_SECURITY
|
||||
transfer_access = list(ACCESS_SECURITY)
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
size = 5
|
||||
tgui_id = "NtosSecurEye"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
program_icon_state = "smmon_0"
|
||||
extended_desc = "Crystal Integrity Monitoring System, connects to specially calibrated supermatter sensors to provide information on the status of supermatter-based engines."
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = ACCESS_CONSTRUCTION
|
||||
transfer_access = list(ACCESS_CONSTRUCTION)
|
||||
size = 5
|
||||
tgui_id = "NtosSupermatterMonitor"
|
||||
program_icon = "radiation"
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
data += active.ui_data()
|
||||
data["singlecrystal"] = FALSE
|
||||
|
||||
|
||||
else
|
||||
var/list/SMS = list()
|
||||
for(var/obj/machinery/power/supermatter_crystal/S in supermatters)
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
size = 16
|
||||
tgui_id = "NtosTechweb"
|
||||
program_icon = "atom"
|
||||
required_access = ACCESS_HEADS
|
||||
transfer_access = ACCESS_RD
|
||||
required_access = list(ACCESS_HEADS, ACCESS_RND)
|
||||
transfer_access = list(ACCESS_RESEARCH)
|
||||
/// Reference to global science techweb
|
||||
var/datum/techweb/stored_research
|
||||
/// Access needed to lock/unlock the console
|
||||
|
||||
Reference in New Issue
Block a user