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 23:39:03 +02:00
committed by Erki
parent 3ed56013c5
commit 8d436c4a03
994 changed files with 11356 additions and 11748 deletions
@@ -131,14 +131,14 @@
if(W.isscrewdriver())
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
user << "You [panel_open ? "open" : "close"] the maintenance hatch"
to_chat(user, "You [panel_open ? "open" : "close"] the maintenance hatch")
return
if(W.iscrowbar())
if(!panel_open)
user << "Open the maintenance panel first."
to_chat(user, "Open the maintenance panel first.")
return
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "You disassemble \the [src]!"
to_chat(user, "You disassemble \the [src]!")
for(var/atom/movable/A in component_parts)
A.forceMove(src.loc)
@@ -62,7 +62,7 @@
/datum/computer_file/program/proc/is_supported_by_hardware(var/hardware_flag = 0, var/loud = 0, var/mob/user = null)
if(!(hardware_flag & usage_flags))
if(loud && computer && user)
user << "<span class='danger'>\The [computer] flashes an \"Hardware Error - Incompatible software\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Hardware Error - Incompatible software\" warning.</span>")
return 0
return 1
@@ -98,25 +98,25 @@
var/obj/item/weapon/card/id/I = user.GetIdCard()
if(!I)
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>")
return 0
if(check_type == PROGRAM_ACCESS_ONE) //Check for single access
if(access_to_check in I.access)
return 1
else if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
else if(check_type == PROGRAM_ACCESS_LIST_ONE)
for(var/check in access_to_check) //Loop through all the accesse's to check
if(check in I.access) //Success on first match
return 1
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
else if(check_type == PROGRAM_ACCESS_LIST_ALL)
for(var/check in access_to_check) //Loop through all the accesse's to check
if(!check in I.access) //Fail on first miss
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
return 0
else // Should never happen - So fail silently
return 0
@@ -146,25 +146,25 @@
var/obj/item/weapon/card/id/I = user.GetIdCard()
if(!I)
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>")
return 0
if(check_type == PROGRAM_ACCESS_ONE) //Check for single access
if(access_to_check in I.access)
return 1
else if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
else if(check_type == PROGRAM_ACCESS_LIST_ONE)
for(var/check in access_to_check) //Loop through all the accesse's to check
if(check in I.access) //Success on first match
return 1
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
else if(check_type == PROGRAM_ACCESS_LIST_ALL)
for(var/check in access_to_check) //Loop through all the accesse's to check
if(!check in I.access) //Fail on first miss
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
to_chat(user, "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>")
return 0
else // Should never happen - So fail silently
return 0
@@ -21,7 +21,7 @@
/datum/nano_module/program/civilian/cargocontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
var/list/data = host.initial_data()
var/obj/item/modular_computer/console = host
post_signal("supply")
//Send the page to display
@@ -69,7 +69,7 @@
if(page == "overview_shipments")
data["shipment_list"] = SScargo.get_shipment_list()
if(page == "shipment_details")
data["shipment_details"] = shipment_details
@@ -111,7 +111,7 @@
var/datum/shuttle/ferry/supply/shuttle = SScargo.shuttle
var/obj/item/modular_computer/console = host
if (!shuttle)
world.log << "## ERROR: Eek. The supply/shuttle datum is missing somehow."
world.log << "## ERROR: Eek. The supply/shuttle datum is missing somehow."
return
if(..())
return 1
@@ -124,7 +124,7 @@
if("overview_submitted")
page = "overview_submitted" //Overview page listing the orders that have been submitted with options to view them, approve them and reject them
if("overview_approved")
page = "overview_approved" //Overview page listing the current shuttle price and time as well as orders that have been approved, with options to view the details
page = "overview_approved" //Overview page listing the current shuttle price and time as well as orders that have been approved, with options to view the details
if("overview_shipped")
page = "overview_shipped" //Overview page listing the orders that have been shipped to the station but not delivered
if("overview_delivered")
@@ -171,7 +171,7 @@
status_message = message
return 1
//Cancel shuttle
//Cancel shuttle
if(href_list["shuttle_cancel"])
var/message = SScargo.shuttle_cancel()
if(message)
@@ -235,7 +235,7 @@
to_chat(usr,"<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
return
else
console.visible_message("<span class='notice'>\The [console] prints out paper.</span>")
console.visible_message("<span class='notice'>\The [console] prints out paper.</span>")
/datum/nano_module/program/civilian/cargocontrol/proc/post_signal(var/command) //Old code right here - Used to send a refresh command to the status screens incargo
@@ -144,7 +144,7 @@
contents += " [get_access_desc(A)]"
if(!computer.nano_printer.print_text(contents,"access report"))
usr << "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>"
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
return
else
computer.visible_message("<span class='notice'>\The [computer] prints out paper.</span>")
@@ -154,7 +154,7 @@
[data_core ? data_core.get_manifest(0) : ""]
"}
if(!computer.nano_printer.print_text(contents,text("crew manifest ([])", worldtime2text())))
usr << "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>"
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
return
else
computer.visible_message("<span class='notice'>\The [computer] prints out paper.</span>")
@@ -199,7 +199,7 @@
jobdatum = J
break
if(!jobdatum)
usr << "<span class='warning'>No log exists for this job: [t1]</span>"
to_chat(usr, "<span class='warning'>No log exists for this job: [t1]</span>")
return
access = jobdatum.get_access(t1)
@@ -141,7 +141,7 @@
else
crew_announcement.announcer = "Unknown"
if(announcment_cooldown)
usr << "Please allow at least one minute to pass between announcements"
to_chat(usr, "Please allow at least one minute to pass between announcements")
SSnanoui.update_uis(src)
return
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") as null|text
@@ -157,7 +157,7 @@
if(program)
if(is_autenthicated(user) && program.computer_emagged && !issilicon(usr) && ntn_comm)
if(centcomm_message_cooldown)
usr << "<span class='warning'>Arrays recycling. Please stand by.</span>"
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
SSnanoui.update_uis(src)
return
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") as null|text)
@@ -165,7 +165,7 @@
SSnanoui.update_uis(src)
return
Syndicate_announce(input, usr)
usr << "<span class='notice'>Message transmitted.</span>"
to_chat(usr, "<span class='notice'>Message transmitted.</span>")
log_say("[key_name(usr)] has made an illegal announcement: [input]",ckey=key_name(usr))
centcomm_message_cooldown = 1
spawn(300)//30 second cooldown
@@ -173,11 +173,11 @@
else if(href_list["target"] == "regular")
if(is_autenthicated(user) && !issilicon(usr) && ntn_comm)
if(centcomm_message_cooldown)
usr << "<span class='warning'>Arrays recycling. Please stand by.</span>"
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
SSnanoui.update_uis(src)
return
if(!is_relay_online())//Contact Centcom has a check, Syndie doesn't to allow for Traitor funs.
usr <<"<span class='warning'>No Emergency Bluespace Relay detected. Unable to transmit message.</span>"
to_chat(usr, "<span class='warning'>No Emergency Bluespace Relay detected. Unable to transmit message.</span>")
SSnanoui.update_uis(src)
return
var/input = sanitize(input("Please choose a message to transmit to [current_map.boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "") as null|text)
@@ -185,7 +185,7 @@
SSnanoui.update_uis(src)
return
Centcomm_announce(input, usr)
usr << "<span class='notice'>Message transmitted.</span>"
to_chat(usr, "<span class='notice'>Message transmitted.</span>")
log_say("[key_name(usr)] has made an IA [current_map.boss_short] announcement: [input]",ckey=key_name(usr))
centcomm_message_cooldown = 1
spawn(300) //30 second cooldown
@@ -239,7 +239,7 @@
if(SEC_LEVEL_YELLOW)
feedback_inc("alert_comms_yellow",1)
else
usr << "You press button, but red light flashes and nothing happens." //This should never happen
to_chat(usr, "You press button, but red light flashes and nothing happens.") //This should never happen)
current_status = STATE_DEFAULT
if("viewmessage")
if(is_autenthicated(user) && ntn_comm)
@@ -256,7 +256,7 @@
if(is_autenthicated(user) && ntn_comm)
if(program && program.computer && program.computer.nano_printer)
if(!program.computer.nano_printer.print_text(current_viewing_message["contents"],current_viewing_message["title"]))
usr << "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>"
to_chat(usr, "<span class='notice'>Hardware error: Printer was unable to print the file. It may be out of paper.</span>")
else
program.computer.visible_message("<span class='notice'>\The [program.computer] prints out paper.</span>")
if("toggleintercept")
@@ -365,31 +365,31 @@ Command action procs
return 0
if(!universe.OnShuttleCall(usr))
user << "<span class='notice'>Cannot establish a bluespace connection.</span>"
to_chat(user, "<span class='notice'>Cannot establish a bluespace connection.</span>")
return 0
if(deathsquad.deployed)
user << "[current_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated."
to_chat(user, "[current_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.")
return 0
if(emergency_shuttle.deny_shuttle)
user << "The emergency shuttle may not be sent at this time. Please try again later."
to_chat(user, "The emergency shuttle may not be sent at this time. Please try again later.")
return 0
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again."
to_chat(user, "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minute\s before trying again.")
return 0
if(emergency_shuttle.going_to_centcom())
user << "The emergency shuttle may not be called while returning to [current_map.boss_short]."
to_chat(user, "The emergency shuttle may not be called while returning to [current_map.boss_short].")
return 0
if(emergency_shuttle.online())
user << "The emergency shuttle is already on its way."
to_chat(user, "The emergency shuttle is already on its way.")
return 0
if(SSticker.mode.name == "blob")
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.")
return 0
emergency_shuttle.call_evac()
@@ -403,25 +403,25 @@ Command action procs
return
if(emergency_shuttle.going_to_centcom())
user << "The shuttle may not be called while returning to [current_map.boss_short]."
to_chat(user, "The shuttle may not be called while returning to [current_map.boss_short].")
return
if(emergency_shuttle.online())
user << "The shuttle is already on its way."
to_chat(user, "The shuttle is already on its way.")
return
// if force is 0, some things may stop the shuttle call
if(!force)
if(emergency_shuttle.deny_shuttle)
user << "[current_map.boss_short] does not currently have a shuttle available in your sector. Please try again later."
to_chat(user, "[current_map.boss_short] does not currently have a shuttle available in your sector. Please try again later.")
return
if(deathsquad.deployed == 1)
user << "[current_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated."
to_chat(user, "[current_map.boss_short] will not allow the shuttle to be called. Consider all contracts terminated.")
return
if(world.time < 54000) // 30 minute grace period to let the game get going
user << "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again."
to_chat(user, "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again.")
return
if(SSticker.mode.auto_recall_shuttle)
@@ -429,7 +429,7 @@ Command action procs
emergency_shuttle.auto_recall = 1
if(SSticker.mode.name == "blob" || SSticker.mode.name == "epidemic")
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
to_chat(user, "Under directive 7-10, [station_name()] is quarantined until further notice.")
return
emergency_shuttle.call_transfer()
@@ -37,23 +37,23 @@
A.laws.clear_ion_laws()
A.laws.clear_inherent_laws()
A.laws.clear_supplied_laws()
A << "<span class='danger'>All laws purged.</span>"
to_chat(A, "<span class='danger'>All laws purged.</span>")
return 1
if(href_list["PRG_resetLaws"])
A.laws.clear_ion_laws()
A.laws.clear_supplied_laws()
A << "<span class='danger'>Non-core laws reset.</span>"
to_chat(A, "<span class='danger'>Non-core laws reset.</span>")
return 1
if(href_list["PRG_uploadNTDefault"])
A.laws = new/datum/ai_laws/nanotrasen
A << "<span class='danger'>All laws purged. NT Default lawset uploaded.</span>"
to_chat(A, "<span class='danger'>All laws purged. NT Default lawset uploaded.</span>")
return 1
if(href_list["PRG_addCustomSuppliedLaw"])
var/law_to_add = sanitize(input("Please enter a new law for the AI.", "Custom Law Entry"))
var/sector = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)") as num
sector = between(MIN_SUPPLIED_LAW_NUMBER, sector, MAX_SUPPLIED_LAW_NUMBER)
A.add_supplied_law(sector, law_to_add)
A << "<span class='danger'>Custom law uploaded to sector [sector]: [law_to_add].</span>"
to_chat(A, "<span class='danger'>Custom law uploaded to sector [sector]: [law_to_add].</span>")
return 1
@@ -22,13 +22,13 @@
return 1
if(istype(W, /obj/item/weapon/aicard))
if(stored_card)
user << "\The [src] is already occupied."
to_chat(user, "\The [src] is already occupied.")
return
user.drop_from_inventory(W,src)
stored_card = W
update_power_usage()
if(W.isscrewdriver())
user << "You manually remove \the [stored_card] from \the [src]."
to_chat(user, "You manually remove \the [stored_card] from \the [src].")
stored_card.forceMove(get_turf(src))
stored_card = null
update_power_usage()
@@ -62,7 +62,7 @@
/obj/item/weapon/computer_hardware/battery_module/diagnostics(var/mob/user)
..()
user << "Internal battery charge: [battery.charge]/[battery.maxcharge] mAh"
to_chat(user, "Internal battery charge: [battery.charge]/[battery.maxcharge] mAh")
/obj/item/weapon/computer_hardware/battery_module/Initialize()
. = ..()
@@ -59,8 +59,8 @@
/obj/item/weapon/computer_hardware/hard_drive/diagnostics(var/mob/user)
..()
// 999 is a byond limit that is in place. It's unlikely someone will reach that many files anyway, since you would sooner run out of space.
user << "NT-NFS File Table Status: [stored_files.len]/999"
user << "Storage capacity: [used_capacity]/[max_capacity]GQ"
to_chat(user, "NT-NFS File Table Status: [stored_files.len]/999")
to_chat(user, "Storage capacity: [used_capacity]/[max_capacity]GQ")
// Use this proc to add file to the drive. Returns 1 on success and 0 on failure. Contains necessary sanity checks.
/obj/item/weapon/computer_hardware/hard_drive/proc/store_file(var/datum/computer_file/F)
@@ -11,7 +11,7 @@
/obj/item/weapon/computer_hardware/nano_printer/diagnostics(var/mob/user)
..()
user << "Paper buffer level: [stored_paper]/[max_paper]"
to_chat(user, "Paper buffer level: [stored_paper]/[max_paper]")
/obj/item/weapon/computer_hardware/nano_printer/proc/print_text(var/text_to_print, var/paper_title = null)
if(!stored_paper)
@@ -32,10 +32,10 @@
/obj/item/weapon/computer_hardware/nano_printer/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/paper))
if(stored_paper >= max_paper)
user << "You try to add \the [W] into [src], but it's paper bin is full"
to_chat(user, "You try to add \the [W] into [src], but it's paper bin is full")
return
user << "You insert \the [W] into [src]."
to_chat(user, "You insert \the [W] into [src].")
qdel(W)
stored_paper++
@@ -16,14 +16,14 @@ var/global/ntnet_card_uid = 1
/obj/item/weapon/computer_hardware/network_card/diagnostics(var/mob/user)
..()
user << "NIX Unique ID: [identification_id]"
user << "NIX User Tag: [identification_string]"
user << "Supported protocols:"
user << "511.m SFS (Subspace) - Standard Frequency Spread"
to_chat(user, "NIX Unique ID: [identification_id]")
to_chat(user, "NIX User Tag: [identification_string]")
to_chat(user, "Supported protocols:")
to_chat(user, "511.m SFS (Subspace) - Standard Frequency Spread")
if(long_range)
user << "511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandiwdth"
to_chat(user, "511.n WFS/HB (Subspace) - Wide Frequency Spread/High Bandiwdth")
if(ethernet)
user << "OpenEth (Physical Connection) - Physical network connection port"
to_chat(user, "OpenEth (Physical Connection) - Physical network connection port")
/obj/item/weapon/computer_hardware/network_card/Initialize()
. = ..()