mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Adds Missing Access Checks to Airlock Equipment (#21148)
Fixes https://github.com/Aurorastation/Aurora.3/issues/13378 Airlock controllers and Sensors now also check if the user has access --------- Signed-off-by: Ben <91219575+Ben10083@users.noreply.github.com> Co-authored-by: Ben10083 <Ben10083@users.noreply.github.com> Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
co-authored by
Ben10083
Matt Atlas
parent
30214f671f
commit
b9d1343ade
@@ -77,6 +77,8 @@
|
||||
|
||||
var/obj/machinery/airlock_sensor/sensor = thing
|
||||
if(istype(sensor))
|
||||
sensor.req_access = req_access
|
||||
sensor.req_one_access = req_one_access
|
||||
sensor.set_frequency(frequency)
|
||||
sensor.master_tag = MARKER_AIRLOCK_TAG_MASTER
|
||||
if(is_interior)
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
|
||||
var/obj/machinery/airlock_sensor/sensor = thing
|
||||
if(istype(sensor))
|
||||
sensor.req_access = req_access
|
||||
sensor.req_one_access = req_one_access
|
||||
sensor.set_frequency(frequency)
|
||||
sensor.master_tag = MARKER_AIRLOCK_TAG_MASTER
|
||||
if(is_interior)
|
||||
|
||||
@@ -233,19 +233,19 @@ ABSTRACT_TYPE(/datum/computer_file/program)
|
||||
if(access_to_check in I.access)
|
||||
return TRUE
|
||||
else if(loud)
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access Denied.\"."))
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access denied.\"."))
|
||||
return FALSE
|
||||
else if(check_type == PROGRAM_ACCESS_LIST_ONE)
|
||||
for(var/check in access_to_check) //Loop through all the accesse's to check
|
||||
if(check in I.access) //Success on first match
|
||||
return TRUE
|
||||
if(loud)
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access Denied.\"."))
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access denied.\"."))
|
||||
else if(check_type == PROGRAM_ACCESS_LIST_ALL)
|
||||
for(var/check in access_to_check) //Loop through all the accesse's to check
|
||||
if(!(check in I.access)) //Fail on first miss
|
||||
if(loud)
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access Denied.\"."))
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access denied.\"."))
|
||||
return FALSE
|
||||
else // Should never happen - So fail silently
|
||||
return FALSE
|
||||
@@ -288,20 +288,20 @@ ABSTRACT_TYPE(/datum/computer_file/program)
|
||||
if(access_to_check in I.access)
|
||||
return TRUE
|
||||
else if(loud)
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access Denied.\"."))
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access denied.\"."))
|
||||
return FALSE
|
||||
else if(check_type == PROGRAM_ACCESS_LIST_ONE)
|
||||
for(var/check in access_to_check) //Loop through all the accesse's to check
|
||||
if(check in I.access) //Success on first match
|
||||
return TRUE
|
||||
if(loud)
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access Denied.\"."))
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access denied.\"."))
|
||||
return FALSE
|
||||
else if(check_type == PROGRAM_ACCESS_LIST_ALL)
|
||||
for(var/check in access_to_check) //Loop through all the accesse's to check
|
||||
if(!(check in I.access)) //Fail on first miss
|
||||
if(loud)
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access Denied.\"."))
|
||||
to_chat(user, SPAN_WARNING("\The [computer] flashes, \"Access denied.\"."))
|
||||
return FALSE
|
||||
else // Should never happen - So fail silently
|
||||
return FALSE
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
if(can_access_network(usr, get_camera_access(params["switch_network"])))
|
||||
current_network = params["switch_network"]
|
||||
else
|
||||
to_chat(usr, SPAN_WARNING("\The [ui_host()] shows an \"Network Access Denied\" error message."))
|
||||
to_chat(usr, SPAN_WARNING("\The [ui_host()] shows an \"Network access denied\" error message."))
|
||||
return TRUE
|
||||
|
||||
if("reset")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
req_access = list(ACCESS_CENT_SPECOPS)
|
||||
|
||||
/obj/machinery/computer/shuttle_control/specops/attack_ai(user as mob)
|
||||
to_chat(user, SPAN_WARNING("Access Denied."))
|
||||
to_chat(user, SPAN_WARNING("Access denied."))
|
||||
return 1
|
||||
|
||||
/datum/shuttle/autodock/ferry/specops
|
||||
|
||||
Reference in New Issue
Block a user