[MIRROR] Minor pray verb improvements (#6851)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2023-08-22 00:02:19 -07:00
committed by GitHub
parent a485de4f69
commit a8e84c5257
4 changed files with 20 additions and 7 deletions

View File

@@ -35,6 +35,11 @@
if (config.log_admin)
WRITE_LOG(diary, "ADMINPM: [key_name(source)]->[key_name(dest)]: [html_decode(text)]")
/proc/log_pray(text, client/source)
admin_log.Add(text)
if (config.log_admin)
WRITE_LOG(diary, "PRAY: [key_name(source)]: [text]")
/proc/log_debug(text)
if (config.log_debug)
WRITE_LOG(debug_log, "DEBUG: [sanitize(text)]")

View File

@@ -1,4 +1,4 @@
/mob/verb/pray(msg as text)
/mob/verb/pray()
set category = "IC"
set name = "Pray"
@@ -6,18 +6,18 @@
to_chat(usr, "<font color='red'>Speech is currently admin-disabled.</font>")
return
msg = sanitize(msg)
if(!msg) return
var/raw_msg = sanitize(tgui_input_text(usr, "Prayers are sent to staff but do not open tickets or go to Discord. If you have a technical difficulty or an event/spice idea/hook - please ahelp instead. Thank you!", "Pray", null, MAX_MESSAGE_LEN))
if(!raw_msg) return
if(usr.client)
if(msg)
if(raw_msg)
client.handle_spam_prevention(MUTE_PRAY)
if(usr.client.prefs.muted & MUTE_PRAY)
to_chat(usr, "<font color='red'> You cannot pray (muted).</font>")
return
var/icon/cross = icon('icons/obj/storage.dmi',"bible")
msg = "<font color='blue'>\icon[cross][bicon(cross)] <b><font color=purple>PRAY: </font>[key_name(src, 1)] [ADMIN_QUE(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] ([admin_jump_link(src, src)]) [ADMIN_CA(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]:</b> [msg]</font>"
var/msg = "<span class='filter_pray'><font color='blue'>\icon[cross][bicon(cross)] <b><font color=purple>PRAY: </font>[key_name(src, 1)] [ADMIN_QUE(src)] [ADMIN_PP(src)] [ADMIN_VV(src)] [ADMIN_SM(src)] ([admin_jump_link(src, src)]) [ADMIN_CA(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]:</b> [raw_msg]</font></span>"
for(var/client/C in GLOB.admins)
if(R_ADMIN|R_EVENT & C.holder.rights)
@@ -27,7 +27,7 @@
to_chat(usr, "Your prayers have been received by the gods.")
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//log_admin("HELP: [key_name(src)]: [msg]")
log_pray(raw_msg, src)
/proc/CentCom_announce(var/msg, var/mob/Sender, var/iamessage)
msg = "<font color='blue'><b><font color=orange>[uppertext(using_map.boss_short)]M[iamessage ? " IA" : ""]:</font>[key_name(Sender, 1)] [ADMIN_PP(Sender)] [ADMIN_VV(Sender)] [ADMIN_SM(Sender)] ([admin_jump_link(Sender)]) [ADMIN_CA(Sender)] [ADMIN_BSA(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]:</b> [msg]</font>"

View File

@@ -184,6 +184,14 @@ function start_vue() {
required: false,
admin: false
},
{
matches: ".filter_pray",
becomes: "vc_pray",
pretty: "Pray",
tooltip: "Prayer messages",
required: false,
admin: false
},
{
matches: ".ooc, .filter_ooc",
becomes: "vc_globalooc",

File diff suppressed because one or more lines are too long