From c40aada7c754f7c46cf0cb0990b5c5d5db6f444d Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Sat, 15 Jul 2023 14:24:27 -0400 Subject: [PATCH 1/3] General Quarters --- code/game/machinery/ARES/ARES_procs.dm | 13 +++++++++++++ tgui/packages/tgui/interfaces/AresInterface.js | 16 ++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/code/game/machinery/ARES/ARES_procs.dm b/code/game/machinery/ARES/ARES_procs.dm index 5df01056e284..e56c20874455 100644 --- a/code/game/machinery/ARES/ARES_procs.dm +++ b/code/game/machinery/ARES/ARES_procs.dm @@ -500,6 +500,19 @@ GLOBAL_LIST_INIT(maintenance_categories, list( current_menu = "read_deleted" // -- Emergency Buttons -- // + if("general_quarters") + if(security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA) + to_chat(usr, SPAN_WARNING("Security is already red or above, General Quarters cannot be called.")) + playsound(src, 'sound/machines/buzz-two.ogg', 15, 1) + return FALSE + set_security_level(2, no_sound=1, announce=0) + shipwide_ai_announcement("ATTENTION! GENERAL QUARTERS. ALL HANDS, MAN YOUR BATTLESTATIONS.", MAIN_AI_SYSTEM, 'sound/effects/GQfullcall.ogg') + log_game("[key_name(usr)] has called for general quarters via ARES.") + message_admins("[key_name_admin(usr)] has called for general quarters via ARES.") + var/datum/ares_link/link = GLOB.ares_link + link.log_ares_security("General Quarters", "[last_login] has called for general quarters via ARES.") + . = TRUE + if("evacuation_start") if(security_level < SEC_LEVEL_RED) to_chat(usr, SPAN_WARNING("The ship must be under red alert in order to enact evacuation procedures.")) diff --git a/tgui/packages/tgui/interfaces/AresInterface.js b/tgui/packages/tgui/interfaces/AresInterface.js index 343fa90f39d9..ba4ebc302526 100644 --- a/tgui/packages/tgui/interfaces/AresInterface.js +++ b/tgui/packages/tgui/interfaces/AresInterface.js @@ -1371,6 +1371,8 @@ const Emergency = (props, context) => { nuketimelock, nuke_available, } = data; + const canQuarters = alert_level < 2; + let quarters_reason = 'Call for General Quarters.'; const minimumEvacTime = worldtime > distresstimelock; const distressCooldown = worldtime < distresstime; const canDistress = alert_level === 2 && !distressCooldown && minimumEvacTime; @@ -1452,6 +1454,20 @@ const Emergency = (props, context) => {

Emergency Protocols

+ act('general_quarters')} + disabled={!canQuarters} + /> Date: Sat, 15 Jul 2023 14:29:42 -0400 Subject: [PATCH 2/3] Modification to chat warning --- code/game/machinery/ARES/ARES_procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/ARES/ARES_procs.dm b/code/game/machinery/ARES/ARES_procs.dm index e56c20874455..a5d42617607e 100644 --- a/code/game/machinery/ARES/ARES_procs.dm +++ b/code/game/machinery/ARES/ARES_procs.dm @@ -502,7 +502,7 @@ GLOBAL_LIST_INIT(maintenance_categories, list( // -- Emergency Buttons -- // if("general_quarters") if(security_level == SEC_LEVEL_RED || security_level == SEC_LEVEL_DELTA) - to_chat(usr, SPAN_WARNING("Security is already red or above, General Quarters cannot be called.")) + to_chat(usr, SPAN_WARNING("Alert level is already red or above, General Quarters cannot be called.")) playsound(src, 'sound/machines/buzz-two.ogg', 15, 1) return FALSE set_security_level(2, no_sound=1, announce=0) From 64c2cd6ed8d850305657f600786c8cdced335fa7 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Sat, 15 Jul 2023 14:41:05 -0400 Subject: [PATCH 3/3] Icon for button --- tgui/packages/tgui/interfaces/AresInterface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgui/packages/tgui/interfaces/AresInterface.js b/tgui/packages/tgui/interfaces/AresInterface.js index ba4ebc302526..5cd78011a81c 100644 --- a/tgui/packages/tgui/interfaces/AresInterface.js +++ b/tgui/packages/tgui/interfaces/AresInterface.js @@ -1457,7 +1457,7 @@ const Emergency = (props, context) => {