Converts all necessary << outputs into the to_chat() macro. (#6076)

This PR will lead us towards the Promised Day, for in its wake there shall be much celebration and ecstasy as this world becomes a world suitable for developer hegemony. The first strike is thusly;

All << is converted into to_chat().
This commit is contained in:
LordFowl
2019-03-10 17:39:03 -04:00
committed by Erki
parent 3ed56013c5
commit 8d436c4a03
994 changed files with 11356 additions and 11748 deletions

View File

@@ -8,7 +8,7 @@ var/global/enabled_spooking = 0
msg = "<span class=\"log_message\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
for(var/client/C in admins)
if((R_ADMIN|R_MOD) & C.holder.rights)
C << msg
to_chat(C, msg)
/proc/msg_admin_attack(var/text,var/ckey="",var/ckey_target="") //Toggleable Attack Messages
log_attack(text,ckey=ckey,ckey_target=ckey_target)
@@ -17,12 +17,12 @@ var/global/enabled_spooking = 0
if((R_ADMIN|R_MOD) & C.holder.rights)
if(C.prefs.toggles & CHAT_ATTACKLOGS)
var/msg = rendered
C << msg
to_chat(C, msg)
proc/admin_notice(var/message, var/rights)
for(var/mob/M in mob_list)
if(check_rights(rights, 0, M))
M << message
to_chat(M, message)
///////////////////////////////////////////////////////////////////////////////////////////////Panels
@@ -32,12 +32,12 @@ proc/admin_notice(var/message, var/rights)
set desc="Edit player (respawn, ban, heal, etc)"
if(!M)
usr << "You seem to be selecting a mob that doesn't exist anymore."
to_chat(usr, "You seem to be selecting a mob that doesn't exist anymore.")
return
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
to_chat(usr, "Error: you are not an admin!")
return
var/body = "<html><head><title>Options for [M.key]</title></head>"
@@ -210,7 +210,7 @@ proc/admin_notice(var/message, var/rights)
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
to_chat(usr, "Error: you are not an admin!")
return
if (!check_rights(R_ADMIN|R_MOD))
return
@@ -273,7 +273,7 @@ proc/admin_notice(var/message, var/rights)
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
to_chat(usr, "Error: you are not an admin!")
return
if (config.ban_legacy_system)
@@ -325,7 +325,7 @@ proc/admin_notice(var/message, var/rights)
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
to_chat(usr, "Error: you are not an admin!")
return
if (!admincaster_signature)
@@ -435,7 +435,7 @@ proc/admin_notice(var/message, var/rights)
i++
dat+="<BLOCKQUOTE style=\"padding:4px;border-left:4px #797979 solid\">[MESSAGE.body] <FONT SIZE=1>\[Likes: <A href='?src=\ref[src];ac_setlikes=1;'><FONT COLOR='DarkGreen'>[MESSAGE.likes]</FONT></A> Dislikes: <A href='?src=\ref[src];ac_setdislikes=1;'><FONT COLOR='maroon'>[MESSAGE.dislikes]</FONT></A>\]</FONT><BR>"
if(MESSAGE.img)
usr << browse_rsc(MESSAGE.img, "tmp_photo[i].png")
to_chat(usr, browse_rsc(MESSAGE.img, "tmp_photo[i].png"))
dat+="<img src='tmp_photo[i].png' width = '180'><BR><BR>"
dat+="<FONT SIZE=1><A href='?src=\ref[src];ac_view_comments=1;ac_story=\ref[MESSAGE]'>View Comments</A> <A href='?src=\ref[src];ac_add_comment=1;ac_story=\ref[MESSAGE]'>Add Comment</A> <A href='?src=\ref[src];ac_like=1;ac_story=\ref[MESSAGE]'>Like Story</A> <A href='?src=\ref[src];ac_dislike=1;ac_story=\ref[MESSAGE]'>Dislike Story</A></FONT><BR>"
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.author] - [MESSAGE.time_stamp]</FONT>\]</FONT></BLOCKQUOTE><BR>"
@@ -551,7 +551,7 @@ proc/admin_notice(var/message, var/rights)
<B>Photo:</B>:
"}
if(SSnews.wanted_issue.img)
usr << browse_rsc(SSnews.wanted_issue.img, "tmp_photow.png")
to_chat(usr, browse_rsc(SSnews.wanted_issue.img, "tmp_photow.png"))
dat+="<BR><img src='tmp_photow.png' width = '180'>"
else
dat+="None"
@@ -779,7 +779,7 @@ proc/admin_notice(var/message, var/rights)
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return 1
else
usr << "<font color='red'>Error: Start Now: Game has already started.</font>"
to_chat(usr, "<font color='red'>Error: Start Now: Game has already started.</font>")
return 0
/datum/admins/proc/toggleenter()
@@ -977,18 +977,18 @@ proc/admin_notice(var/message, var/rights)
if(!check_rights(R_SPAWN)) return
if(!custom_items)
usr << "Custom item list is null."
to_chat(usr, "Custom item list is null.")
return
if(!custom_items.len)
usr << "Custom item list not populated."
to_chat(usr, "Custom item list not populated.")
return
for(var/assoc_key in custom_items)
usr << "[assoc_key] has:"
to_chat(usr, "[assoc_key] has:")
var/list/current_items = custom_items[assoc_key]
for(var/datum/custom_item/item in current_items)
usr << "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]"
to_chat(usr, "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]")
/datum/admins/proc/spawn_plant(seedtype in SSplants.seeds)
set category = "Debug"
@@ -1043,10 +1043,10 @@ proc/admin_notice(var/message, var/rights)
set name = "Show Traitor Panel"
if(!istype(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(!M.mind)
usr << "This mob has no mind!"
to_chat(usr, "This mob has no mind!")
return
M.mind.edit_memory()
@@ -1157,21 +1157,21 @@ proc/admin_notice(var/message, var/rights)
for(var/mob/living/silicon/S in mob_list)
ai_number++
if(isAI(S))
usr << "<b>AI [key_name(S, usr)]'s laws:</b>"
to_chat(usr, "<b>AI [key_name(S, usr)]'s laws:</b>")
else if(isrobot(S))
var/mob/living/silicon/robot/R = S
usr << "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>"
to_chat(usr, "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>")
else if (ispAI(S))
usr << "<b>pAI [key_name(S, usr)]'s laws:</b>"
to_chat(usr, "<b>pAI [key_name(S, usr)]'s laws:</b>")
else
usr << "<b>SOMETHING SILICON [key_name(S, usr)]'s laws:</b>"
to_chat(usr, "<b>SOMETHING SILICON [key_name(S, usr)]'s laws:</b>")
if (S.laws == null)
usr << "[key_name(S, usr)]'s laws are null?? Contact a coder."
to_chat(usr, "[key_name(S, usr)]'s laws are null?? Contact a coder.")
else
S.laws.show_laws(usr)
if(!ai_number)
usr << "<b>No AIs located</b>" //Just so you know the thing is actually working and not just ignoring you.
to_chat(usr, "<b>No AIs located</b>") //Just so you know the thing is actually working and not just ignoring you.)
/datum/admins/proc/show_skills()
set category = "Admin"
@@ -1180,7 +1180,7 @@ proc/admin_notice(var/message, var/rights)
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
to_chat(usr, "Error: you are not an admin!")
return
var/mob/living/carbon/human/M = input("Select mob.", "Select mob.") as null|anything in human_mob_list
@@ -1196,7 +1196,7 @@ proc/admin_notice(var/message, var/rights)
set desc = "Should fix any mob sprite update errors."
if (!holder)
src << "Only administrators may use this command."
to_chat(src, "Only administrators may use this command.")
return
if(istype(H))
@@ -1277,16 +1277,16 @@ proc/admin_notice(var/message, var/rights)
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
usr << "Error: you are not an admin!"
to_chat(usr, "Error: you are not an admin!")
return
if(!SSticker.mode)
usr << "Mode has not started."
to_chat(usr, "Mode has not started.")
return
var/antag_type = input("Choose a template.","Force Latespawn") as null|anything in all_antag_types
if(!antag_type || !all_antag_types[antag_type])
usr << "Aborting."
to_chat(usr, "Aborting.")
return
var/datum/antagonist/antag = all_antag_types[antag_type]
@@ -1301,11 +1301,11 @@ proc/admin_notice(var/message, var/rights)
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins) || !check_rights(R_ADMIN))
usr << "Error: you are not an admin!"
to_chat(usr, "Error: you are not an admin!")
return
if(!SSticker || !SSticker.mode)
usr << "Mode has not started."
to_chat(usr, "Mode has not started.")
return
log_and_message_admins("attempting to force mode autospawn.")