Security no longer has access to non-Security cameras on code green. (#13993)

This commit is contained in:
Matt Atlas
2022-05-20 20:45:47 +02:00
committed by GitHub
parent dc4e77ffd1
commit be6a6f0c91
3 changed files with 69 additions and 6 deletions

View File

@@ -14,6 +14,8 @@
return access_engine
if(NETWORK_MEDICAL)
return access_medical
if(NETWORK_SECURITY)
return access_security
if(NETWORK_RESEARCH,NETWORK_RESEARCH_OUTPOST)
return access_research
if(NETWORK_MINE,NETWORK_SUPPLY,NETWORK_CIVILIAN_WEST,NETWORK_EXPEDITION,NETWORK_CALYPSO,NETWORK_POD)
@@ -84,7 +86,7 @@
if(!network_access)
return TRUE
return check_access(user, access_security) || check_access(user, network_access)
return (check_access(user, access_security) && security_level >= SEC_LEVEL_BLUE) || check_access(user, network_access)
/datum/nano_module/camera_monitor/Topic(href, href_list)
if(..())
@@ -129,6 +131,14 @@
to_chat(user, SPAN_NOTICE("This camera is too far away to connect to!"))
return FALSE
var/access_granted = FALSE
for(var/network in C.network)
if(can_access_network(user, get_camera_access(network)))
access_granted = TRUE //We only need access to one of the networks.
if(!access_granted)
to_chat(user, SPAN_WARNING("Access unauthorized."))
return
set_current(C)
user.machine = ui_host()
user.reset_view(current_camera)