From e8e47902b2c616708c0a878428956937a5da24ef Mon Sep 17 00:00:00 2001 From: forest2001 Date: Sat, 26 Aug 2023 16:49:37 +0100 Subject: [PATCH] proc --- code/datums/emergency_calls/emergency_call.dm | 6 ++++++ code/game/machinery/ARES/ARES_procs.dm | 2 +- code/game/machinery/computer/almayer_control.dm | 6 +++--- code/game/machinery/computer/communications.dm | 2 +- code/game/objects/items/devices/cictablet.dm | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/code/datums/emergency_calls/emergency_call.dm b/code/datums/emergency_calls/emergency_call.dm index 5f0aa6e2378b..6d41c2d64d0b 100644 --- a/code/datums/emergency_calls/emergency_call.dm +++ b/code/datums/emergency_calls/emergency_call.dm @@ -15,6 +15,12 @@ var/input = "ARES. Online. Good morning, marines." shipwide_ai_announcement(input, name, 'sound/AI/ares_online.ogg') +/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 + //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/game/machinery/ARES/ARES_procs.dm b/code/game/machinery/ARES/ARES_procs.dm index 1e409424946e..f48ae47cf0e2 100644 --- a/code/game/machinery/ARES/ARES_procs.dm +++ b/code/game/machinery/ARES/ARES_procs.dm @@ -563,7 +563,7 @@ GLOBAL_LIST_INIT(maintenance_categories, list( for(var/client/admin in GLOB.admins) if((R_ADMIN|R_MOD) & admin.admin_holder.rights) playsound_client(admin,'sound/effects/sos-morse-code.ogg',10) - message_admins("[key_name(usr)] has requested a Distress Beacon (via ARES) ([SSticker.mode.ert_dispatched ? SPAN_RED("A random ERT was dispatched previously.") : SPAN_GREEN("No previous random ERT dispatched.")])! [CC_MARK(usr)] (SEND) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]") + SSticker.mode.request_ert(usr, TRUE) to_chat(usr, SPAN_NOTICE("A distress beacon request has been sent to USCM High Command.")) COOLDOWN_START(src, ares_distress_cooldown, COOLDOWN_COMM_REQUEST) return TRUE diff --git a/code/game/machinery/computer/almayer_control.dm b/code/game/machinery/computer/almayer_control.dm index c271fa60e2cf..012c1d9eea4a 100644 --- a/code/game/machinery/computer/almayer_control.dm +++ b/code/game/machinery/computer/almayer_control.dm @@ -11,11 +11,11 @@ /// requesting a distress beacon COOLDOWN_DECLARE(cooldown_request) /// requesting evac - COOLDOWN_DECLARE(cooldown_destruct) + COOLDOWN_DECLARE(cooldown_destruct) /// messaging HC (admins) COOLDOWN_DECLARE(cooldown_central) /// making a ship announcement - COOLDOWN_DECLARE(cooldown_message) + COOLDOWN_DECLARE(cooldown_message) var/list/messagetitle = list() var/list/messagetext = list() @@ -230,7 +230,7 @@ for(var/client/admin_client as anything in GLOB.admins) if((R_ADMIN|R_MOD) & admin_client.admin_holder.rights) admin_client << 'sound/effects/sos-morse-code.ogg' - message_admins("[key_name(usr)] has requested a Distress Beacon! ([SSticker.mode.ert_dispatched ? SPAN_RED("A random ERT was dispatched previously.") : SPAN_GREEN("No previous random ERT dispatched.")]) [CC_MARK(usr)] (SEND) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]") + SSticker.mode.request_ert(usr) to_chat(usr, SPAN_NOTICE("A distress beacon request has been sent to USCM Central Command.")) COOLDOWN_START(src, cooldown_request, COOLDOWN_COMM_REQUEST) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index b35d1d83c440..f7ea31fba36a 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -200,7 +200,7 @@ for(var/client/C in GLOB.admins) if((R_ADMIN|R_MOD) & C.admin_holder.rights) C << 'sound/effects/sos-morse-code.ogg' - message_admins("[key_name(usr)] has requested a Distress Beacon! ([SSticker.mode.ert_dispatched ? SPAN_RED("A random ERT was dispatched previously.") : SPAN_GREEN("No previous random ERT dispatched.")]) [CC_MARK(usr)] (SEND) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]") + SSticker.mode.request_ert(usr) to_chat(usr, SPAN_NOTICE("A distress beacon request has been sent to USCM Central Command.")) cooldown_request = world.time diff --git a/code/game/objects/items/devices/cictablet.dm b/code/game/objects/items/devices/cictablet.dm index af76c331bf9d..fc9bb015ece0 100644 --- a/code/game/objects/items/devices/cictablet.dm +++ b/code/game/objects/items/devices/cictablet.dm @@ -160,7 +160,7 @@ for(var/client/C in GLOB.admins) if((R_ADMIN|R_MOD) & C.admin_holder.rights) playsound_client(C,'sound/effects/sos-morse-code.ogg',10) - message_admins("[key_name(usr)] has requested a Distress Beacon! ([SSticker.mode.ert_dispatched ? SPAN_RED("A random ERT was dispatched previously.") : SPAN_GREEN("No previous random ERT dispatched.")]) [CC_MARK(usr)] (SEND) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]") + SSticker.mode.request_ert(usr) to_chat(usr, SPAN_NOTICE("A distress beacon request has been sent to USCM Central Command.")) COOLDOWN_START(src, distress_cooldown, COOLDOWN_COMM_REQUEST) return TRUE