mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +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()
|
||||
|
||||
|
||||
@@ -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."
|
||||
@@ -14,6 +14,11 @@
|
||||
{{:helper.link('Call Emergency Shuttle', null, {'action' : 'shuttle', 'target' : 'call'}, !data.net_syscont ? 'disabled' : null)}}
|
||||
{{/if}} </div>
|
||||
{{/if}}
|
||||
{{if data.current_maint_all_access}}
|
||||
<div class=item>{{:helper.link('Disable Emergency Maintenance Access', null, {'action' : 'emergencymaint'}, data.isAI ? 'disabled' : null)}}</div>
|
||||
{{else}}
|
||||
<div class=item>{{:helper.link('Enable Emergency Maintenance Access', null, {'action' : 'emergencymaint'}, data.isAI ? 'disabled' : null)}}</div>
|
||||
{{/if}}
|
||||
<div class=item>{{:helper.link('Set Status Display', null, {'action' : 'sw_menu', 'target' : 4}, !data.net_syscont ? 'disabled' : null)}} </div>
|
||||
<div class=item>{{:helper.link('Message List', null, {'action' : 'sw_menu', 'target' : 2}, !data.net_comms ? 'disabled' : null)}} </div>
|
||||
{{else data.state === 2}}
|
||||
|
||||
Reference in New Issue
Block a user