mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Add Requests Manager to View All Prayers, Centcom/Syndicate Requests & Nuke Code Requests in Round (#60905)
Implements the Requests Manager, a new admin tool used to view all prayers, Centcom/Syndicate requests, and nuke code requests within the span of a round. The verb can be found under Admin.Game, or alternatively just use the verb directly Requests Manager. The requests can be filtered by type (using the type filter button), or using a text search which searches both the message text as well as the request owner's name.
This commit is contained in:
@@ -20,7 +20,8 @@ GLOBAL_PROTECT(admin_verbs_default)
|
||||
/client/proc/stop_sounds,
|
||||
/client/proc/mark_datum_mapview,
|
||||
/client/proc/debugstatpanel,
|
||||
/client/proc/fix_air /*resets air in designated radius to its default atmos composition*/
|
||||
/client/proc/fix_air, /*resets air in designated radius to its default atmos composition*/
|
||||
/client/proc/requests
|
||||
)
|
||||
GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
|
||||
GLOBAL_PROTECT(admin_verbs_admin)
|
||||
|
||||
@@ -40,22 +40,20 @@
|
||||
prayer_type = "SPIRITUAL PRAYER"
|
||||
|
||||
var/msg_tmp = msg
|
||||
GLOB.requests.pray(usr.client, msg, usr.job == "Chaplain")
|
||||
msg = span_adminnotice("[icon2html(cross, GLOB.admins)]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> <span class='linkify'>[msg]</span>")
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(C.prefs.chat_toggles & CHAT_PRAYER)
|
||||
to_chat(C, msg, confidential = TRUE)
|
||||
if(C.prefs.toggles & SOUND_PRAYERS)
|
||||
if(usr.job == "Chaplain")
|
||||
SEND_SOUND(C, sound('sound/effects/pray.ogg'))
|
||||
to_chat(usr, span_info("You pray to the gods: \"[msg_tmp]\""), confidential = TRUE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
//log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
|
||||
/// Used by communications consoles to message CentCom
|
||||
/proc/message_centcom(text, mob/sender)
|
||||
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
GLOB.requests.message_centcom(sender.client, msg)
|
||||
msg = span_adminnotice("<b><font color=orange>CENTCOM:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)]:</b> [msg]")
|
||||
to_chat(GLOB.admins, msg, confidential = TRUE)
|
||||
for(var/obj/machinery/computer/communications/console in GLOB.machines)
|
||||
@@ -64,6 +62,7 @@
|
||||
/// Used by communications consoles to message the Syndicate
|
||||
/proc/message_syndicate(text, mob/sender)
|
||||
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
GLOB.requests.message_syndicate(sender.client, msg)
|
||||
msg = span_adminnotice("<b><font color=crimson>SYNDICATE:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_SYNDICATE_REPLY(sender)]:</b> [msg]")
|
||||
to_chat(GLOB.admins, msg, confidential = TRUE)
|
||||
for(var/obj/machinery/computer/communications/console in GLOB.machines)
|
||||
@@ -72,6 +71,7 @@
|
||||
/// Used by communications consoles to request the nuclear launch codes
|
||||
/proc/nuke_request(text, mob/sender)
|
||||
var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
GLOB.requests.nuke_request(sender.client, msg)
|
||||
msg = span_adminnotice("<b><font color=orange>NUKE CODE REQUEST:</font>[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)] [ADMIN_SET_SD_CODE]:</b> [msg]")
|
||||
to_chat(GLOB.admins, msg, confidential = TRUE)
|
||||
for(var/obj/machinery/computer/communications/console in GLOB.machines)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/// Verb for opening the requests manager panel
|
||||
/client/proc/requests()
|
||||
set name = "Requests Manager"
|
||||
set desc = "Open the request manager panel to view all requests during this round"
|
||||
set category = "Admin.Game"
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Request Manager") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
GLOB.requests.ui_interact(usr)
|
||||
Reference in New Issue
Block a user