mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
Emergency Maint Access from Command Console (#7654)
* Emergency Maint Access from Command Console Emergency Maint Access can now be enabled/disabled using the command consoles * Update code/modules/modular_computers/file_system/programs/command/comm.dm Co-Authored-By: Erki <skull132@users.noreply.github.com>
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
data["boss_short"] = current_map.boss_short
|
||||
data["current_security_level"] = security_level
|
||||
data["current_security_level_title"] = num2seclevel(security_level)
|
||||
data["current_maint_all_access"] = maint_all_access
|
||||
|
||||
data["def_SEC_LEVEL_DELTA"] = SEC_LEVEL_DELTA
|
||||
data["def_SEC_LEVEL_YELLOW"] = SEC_LEVEL_YELLOW
|
||||
@@ -133,6 +134,16 @@
|
||||
switch(href_list["action"])
|
||||
if("sw_menu")
|
||||
current_status = text2num(href_list["target"])
|
||||
if("emergencymaint")
|
||||
if(is_autenthicated(user) && !issilicon(user))
|
||||
if(maint_all_access)
|
||||
revoke_maint_all_access()
|
||||
feedback_inc("alert_comms_maintRevoke",1)
|
||||
log_and_message_admins("disabled emergency maintenance access")
|
||||
else
|
||||
make_maint_all_access()
|
||||
feedback_inc("alert_comms_maintGrant",1)
|
||||
log_and_message_admins("enabled emergency maintenance access")
|
||||
if("announce")
|
||||
if(is_autenthicated(user) && !issilicon(usr) && ntn_comm)
|
||||
if(user)
|
||||
|
||||
@@ -68,8 +68,6 @@
|
||||
if(!config.ert_admin_call_only)
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Distress Beacon'>Distress Beacon</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>"
|
||||
if(screen == 2)
|
||||
dat += "Please swipe your card to authorize the following event: <b>[event]</b>"
|
||||
@@ -144,12 +142,6 @@
|
||||
if("Red alert")
|
||||
set_security_level(SEC_LEVEL_RED)
|
||||
feedback_inc("alert_keycard_auth_red",1)
|
||||
if("Grant Emergency Maintenance Access")
|
||||
make_maint_all_access()
|
||||
feedback_inc("alert_keycard_auth_maintGrant",1)
|
||||
if("Revoke Emergency Maintenance Access")
|
||||
revoke_maint_all_access()
|
||||
feedback_inc("alert_keycard_auth_maintRevoke",1)
|
||||
if("Distress Beacon")
|
||||
if(is_ert_blocked())
|
||||
to_chat(usr, "<span class='warning'>The distress beacon is disabled!</span>")
|
||||
@@ -170,13 +162,11 @@ var/global/maint_all_access = 0
|
||||
|
||||
/proc/make_maint_all_access()
|
||||
maint_all_access = 1
|
||||
to_world("<font size=4 color='red'>Attention!</font>")
|
||||
to_world("<font color='red'>The maintenance access requirement has been revoked on all airlocks.</font>")
|
||||
security_announcement.Announce("The maintenance access requirement has been revoked on all airlocks.","Attention!")
|
||||
|
||||
/proc/revoke_maint_all_access()
|
||||
maint_all_access = 0
|
||||
to_world("<font size=4 color='red'>Attention!</font>")
|
||||
to_world("<font color='red'>The maintenance access requirement has been readded on all maintenance airlocks.</font>")
|
||||
security_announcement.Announce("The maintenance access requirement has been readded on all maintenance airlocks.","Attention!")
|
||||
|
||||
/obj/machinery/door/airlock/allowed(mob/M)
|
||||
if(maint_all_access && src.check_access_list(list(access_maint_tunnels)))
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
//4 = code delta
|
||||
|
||||
//config.alert_desc_blue_downto
|
||||
/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/misc/announcements/security_level.ogg'))
|
||||
/var/datum/announcement/priority/security/security_announcement_down = new(do_log = 0, do_newscast = 1)
|
||||
/var/datum/announcement/priority/security/security_announcement_sound = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/misc/announcements/security_level.ogg'))
|
||||
/var/datum/announcement/priority/security/security_announcement = new(do_log = 0, do_newscast = 1)
|
||||
|
||||
/proc/set_security_level(var/level)
|
||||
switch(level)
|
||||
@@ -26,30 +26,30 @@
|
||||
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
|
||||
switch(level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Security level lowered to green.")
|
||||
security_announcement.Announce("[config.alert_desc_green]", "Attention! Security level lowered to green.")
|
||||
security_level = SEC_LEVEL_GREEN
|
||||
SSnightlight.end_temp_disable()
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(security_level < SEC_LEVEL_BLUE)
|
||||
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Security level elevated to blue.")
|
||||
security_announcement_sound.Announce("[config.alert_desc_blue_upto]", "Attention! Security level elevated to blue.")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Security level lowered to blue.")
|
||||
security_announcement.Announce("[config.alert_desc_blue_downto]", "Attention! Security level lowered to blue.")
|
||||
security_level = SEC_LEVEL_BLUE
|
||||
SSnightlight.end_temp_disable()
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
security_announcement_up.Announce("[config.alert_desc_yellow_to]", "Attention! Biohazard alert declared!")
|
||||
security_announcement_sound.Announce("[config.alert_desc_yellow_to]", "Attention! Biohazard alert declared!")
|
||||
security_level = SEC_LEVEL_YELLOW
|
||||
SSnightlight.end_temp_disable()
|
||||
if(SEC_LEVEL_RED)
|
||||
if(security_level < SEC_LEVEL_RED)
|
||||
security_announcement_up.Announce("[config.alert_desc_red_upto]", "Attention! Security level elevated to red!")
|
||||
security_announcement_sound.Announce("[config.alert_desc_red_upto]", "Attention! Security level elevated to red!")
|
||||
SSnightlight.temp_disable()
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_red_downto]", "Attention! Code red!")
|
||||
security_announcement.Announce("[config.alert_desc_red_downto]", "Attention! Code red!")
|
||||
security_level = SEC_LEVEL_RED
|
||||
post_display_status("alert", "redalert")
|
||||
if(SEC_LEVEL_DELTA)
|
||||
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta security level reached!", new_sound = 'sound/effects/siren.ogg')
|
||||
security_announcement_sound.Announce("[config.alert_desc_delta]", "Attention! Delta security level reached!", new_sound = 'sound/effects/siren.ogg')
|
||||
security_level = SEC_LEVEL_DELTA
|
||||
SSnightlight.temp_disable()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user