diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 743f9be9fec0..e2659ce54cf8 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -101,8 +101,6 @@ /datum/config_entry/flag/continous_rounds -/datum/config_entry/flag/ert_admin_call_only - /datum/config_entry/flag/use_loyalty_implants /datum/config_entry/number/explosive_antigrief diff --git a/code/datums/emergency_calls/emergency_call.dm b/code/datums/emergency_calls/emergency_call.dm index 9db46955a5ea..bb56e449a700 100644 --- a/code/datums/emergency_calls/emergency_call.dm +++ b/code/datums/emergency_calls/emergency_call.dm @@ -15,12 +15,30 @@ var/input = "ARES. Online. Good morning, marines." shipwide_ai_announcement(input, name, 'sound/AI/ares_online.ogg') +///normal manual approval ERT request /datum/game_mode/proc/request_ert(user, ares = FALSE) if(!user) return FALSE message_admins("[key_name(user)] has requested a Distress Beacon! [ares ? SPAN_ORANGE("(via ARES)") : ""] ([SSticker.mode.ert_dispatched ? SPAN_RED("A random ERT was dispatched previously.") : SPAN_GREEN("No previous random ERT dispatched.")]) [CC_MARK(user)] (SEND) (DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]") return TRUE +/// Automatic Approval ERT request , Admins are given 15 seconds to DENY the ERT +/datum/game_mode/proc/authorized_request_ert(user) + if(!user) + return FALSE + if(ert_dispatched) //safety check we dont want ert spam + return FALSE + message_admins("[key_name(user)] has launched a keycard Distress Beacon! (DENY)[ADMIN_JMP_USER(user)] [CC_REPLY(user)]") + addtimer(CALLBACK(src, PROC_REF(process_ert_call)), 15 SECONDS) + return TRUE + +///Process of the ERT call , checks if the request was denied, if not it will call ERT +/datum/game_mode/proc/process_ert_call(user) + if(GLOB.distress_cancel) + GLOB.distress_cancel = FALSE + return + activate_distress() + //The distress call parent. Cannot be called itself due to "name" being a filtered target. /datum/emergency_call var/name = "name" diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm index 4b7cdd69a449..fba9b6fca15a 100644 --- a/code/modules/security_levels/keycard_authentication.dm +++ b/code/modules/security_levels/keycard_authentication.dm @@ -21,6 +21,7 @@ idle_power_usage = 2 active_power_usage = 6 power_channel = POWER_CHANNEL_ENVIRON + COOLDOWN_DECLARE(distress_cooldown) /obj/structure/machinery/keycard_auth/attack_remote(mob/user as mob) to_chat(user, "The station AI is not to interact with these devices.") @@ -41,7 +42,7 @@ else if(screen == 2) event_triggered_by = usr broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices - + playsound(src, 'sound/machines/switch.ogg', 25, 1) /obj/structure/machinery/keycard_auth/power_change() ..() if(stat & NOPOWER) @@ -64,12 +65,13 @@ if(screen == 1) dat += "Select an event to trigger: