Admins can now send CentCom messages as an alternative to SMs (#38401)

* Admins can now send CentCom messages as an alternative to SMs for a more ICly feel.

* aaaa

* oh shit its easy

* aaa
This commit is contained in:
Dax Dupont
2018-06-14 00:23:44 -07:00
committed by Tad Hardesty
parent ff7ce6e336
commit da5ede5ff7
4 changed files with 34 additions and 15 deletions
+2
View File
@@ -62,6 +62,8 @@
body += "<a href='?_src_=holder;[HrefToken()];borgpanel=[REF(M)]'>BP</a> - "
body += "<a href='?priv_msg=[M.ckey]'>PM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];subtlemessage=[REF(M)]'>SM</a> - "
if (ishuman(M) && M.mind)
body += "<a href='?_src_=holder;[HrefToken()];CentComReply=[REF(M)]'>CM</a> - "
body += "<a href='?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(M)]'>FLW</a> - "
//Default to client logs if available
var/source = LOGSRC_MOB
+2
View File
@@ -40,6 +40,7 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
/client/proc/getserverlogs, /*for accessing server logs*/
/client/proc/getcurrentlogs, /*for accessing server logs for the current round*/
/client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/
/datum/admins/proc/cmd_admin_centcom_message, /*send an message to somebody through their headset as CentCom*/
/client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
/client/proc/check_antagonists, /*shows all antags*/
@@ -180,6 +181,7 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list(
/client/proc/admin_ghost,
/client/proc/toggle_view_range,
/client/proc/cmd_admin_subtle_message,
/datum/admins/proc/cmd_admin_centcom_message,
/client/proc/cmd_admin_check_contents,
/datum/admins/proc/access_news_network,
/client/proc/admin_call_shuttle,
+3 -15
View File
@@ -1813,23 +1813,11 @@
usr.client.smite(H)
else if(href_list["CentComReply"])
var/mob/living/carbon/human/H = locate(href_list["CentComReply"]) in GLOB.mob_list
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(!istype(H.ears, /obj/item/radio/headset))
to_chat(usr, "The person you are trying to contact is not wearing a headset.")
if(!check_rights(R_ADMIN))
return
message_admins("[src.owner] has started answering [key_name(H)]'s CentCom request.")
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from CentCom", "")
if(!input)
message_admins("[src.owner] decided not to answer [key_name(H)]'s CentCom request.")
return
log_admin("[src.owner] replied to [key_name(H)]'s CentCom message with the message [input].")
message_admins("[src.owner] replied to [key_name(H)]'s CentCom message with: \"[input]\"")
to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"")
var/mob/M = locate(href_list["CentComReply"])
cmd_admin_centcom_message(M)
else if(href_list["SyndicateReply"])
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
+27
View File
@@ -45,6 +45,33 @@
admin_ticket_log(M, msg)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/cmd_admin_centcom_message(mob/M in GLOB.mob_list)
set category = "Special Verbs"
set name = "CentCom Message"
var/mob/living/carbon/human/H = M
if(!check_rights(R_ADMIN))
return
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(!istype(H.ears, /obj/item/radio/headset))
to_chat(usr, "The person you are trying to contact is not wearing a headset.")
return
message_admins("[key_name_admin(src)] has started answering [key_name_admin(H)]'s CentCom request.")
var/input = input("Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from CentCom", "") as text|null
if(!input)
message_admins("[key_name_admin(src)] decided not to answer [key_name_admin(H)]'s CentCom request.")
return
log_admin("[key_name(src)] replied to [key_name(H)]'s CentCom message with the message [input].")
message_admins("[key_name_admin(src)] replied to [key_name_admin(H)]'s CentCom message with: \"[input]\"")
to_chat(H, "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows: <span class='bold'>[input].</span> Message ends.\"")
SSblackbox.record_feedback("tally", "admin_verb", 1, "CentCom Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_mod_antag_rep(client/C in GLOB.clients, var/operation)
set category = "Special Verbs"
set name = "Modify Antagonist Reputation"