diff --git a/code/modules/modular_computers/file_system/programs/command/comm.dm b/code/modules/modular_computers/file_system/programs/command/comm.dm
index 57e228719d9..f46d58413dc 100644
--- a/code/modules/modular_computers/file_system/programs/command/comm.dm
+++ b/code/modules/modular_computers/file_system/programs/command/comm.dm
@@ -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)
diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm
index 7f1f45c9729..e77c7eaef0c 100644
--- a/code/modules/security levels/keycard authentication.dm
+++ b/code/modules/security levels/keycard authentication.dm
@@ -68,8 +68,6 @@
if(!config.ert_admin_call_only)
dat += "
Distress Beacon"
- dat += "Grant Emergency Maintenance Access"
- dat += "Revoke Emergency Maintenance Access"
dat += ""
if(screen == 2)
dat += "Please swipe your card to authorize the following event: [event]"
@@ -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, "The distress beacon is disabled!")
@@ -170,13 +162,11 @@ var/global/maint_all_access = 0
/proc/make_maint_all_access()
maint_all_access = 1
- to_world("Attention!")
- to_world("The maintenance access requirement has been revoked on all airlocks.")
+ 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("Attention!")
- to_world("The maintenance access requirement has been readded on all maintenance airlocks.")
+ 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)))
diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm
index ecc64291b6c..09a327c030a 100644
--- a/code/modules/security levels/security levels.dm
+++ b/code/modules/security levels/security levels.dm
@@ -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()
diff --git a/html/changelogs/arrow768-easy-emergency-access.yml b/html/changelogs/arrow768-easy-emergency-access.yml
new file mode 100644
index 00000000000..d70283fc227
--- /dev/null
+++ b/html/changelogs/arrow768-easy-emergency-access.yml
@@ -0,0 +1,41 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: Arrow768
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - tweak: "Emergency Maintenance can now be enabled/disabled from the command console."
diff --git a/nano/templates/communication.tmpl b/nano/templates/communication.tmpl
index 2d50e527744..ab618a2e117 100644
--- a/nano/templates/communication.tmpl
+++ b/nano/templates/communication.tmpl
@@ -14,6 +14,11 @@
{{:helper.link('Call Emergency Shuttle', null, {'action' : 'shuttle', 'target' : 'call'}, !data.net_syscont ? 'disabled' : null)}}
{{/if}}
{{/if}}
+ {{if data.current_maint_all_access}}
+ {{:helper.link('Disable Emergency Maintenance Access', null, {'action' : 'emergencymaint'}, data.isAI ? 'disabled' : null)}}
+ {{else}}
+ {{:helper.link('Enable Emergency Maintenance Access', null, {'action' : 'emergencymaint'}, data.isAI ? 'disabled' : null)}}
+ {{/if}}
{{:helper.link('Set Status Display', null, {'action' : 'sw_menu', 'target' : 4}, !data.net_syscont ? 'disabled' : null)}}
{{:helper.link('Message List', null, {'action' : 'sw_menu', 'target' : 2}, !data.net_comms ? 'disabled' : null)}}
{{else data.state === 2}}