Skip to content

Commit

Permalink
proc
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Aug 26, 2023
1 parent d6f6dff commit e8e4790
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];distress=\ref[user]'>SEND</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];ccdeny=\ref[user]'>DENY</A>) [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"
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];distress=\ref[usr]'>SEND</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];ccdeny=\ref[usr]'>DENY</A>) [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
Expand Down
6 changes: 3 additions & 3 deletions code/game/machinery/computer/almayer_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];distress=\ref[usr]'>SEND</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];ccdeny=\ref[usr]'>DENY</A>) [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)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];distress=\ref[usr]'>SEND</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];ccdeny=\ref[usr]'>DENY</A>) [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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/cictablet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];distress=\ref[usr]'>SEND</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];ccdeny=\ref[usr]'>DENY</A>) [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
Expand Down

0 comments on commit e8e4790

Please sign in to comment.