mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
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:
@@ -13,16 +13,16 @@ client/verb/tcssave()
|
||||
log_misc(msg)
|
||||
message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[mob.x];Y=[mob.y];Z=[mob.z]'>JMP</a>)",0,1)
|
||||
Server.setcode( tcscode ) // this actually saves the code from input to the server
|
||||
src << output(null, "tcserror") // clear the errors
|
||||
to_chat(src, output(null, "tcserror")) // clear the errors)
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
|
||||
|
||||
client/verb/tcscompile()
|
||||
@@ -39,42 +39,42 @@ client/verb/tcscompile()
|
||||
var/list/compileerrors = Server.compile() // then compile the code!
|
||||
|
||||
// Output all the compile-time errors
|
||||
src << output(null, "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
|
||||
if(compileerrors.len)
|
||||
src << output("<b>Compile Errors</b>", "tcserror")
|
||||
to_chat(src, output("<b>Compile Errors</b>", "tcserror"))
|
||||
for(var/scriptError/e in compileerrors)
|
||||
src << output("<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
src << output("([compileerrors.len] errors)", "tcserror")
|
||||
to_chat(src, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(src, output("([compileerrors.len] errors)", "tcserror"))
|
||||
|
||||
// Output compile errors to all other people viewing the code too
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
M << output(null, "tcserror")
|
||||
M << output("<b>Compile Errors</b>", "tcserror")
|
||||
to_chat(M, output(null, "tcserror"))
|
||||
to_chat(M, output("<b>Compile Errors</b>", "tcserror"))
|
||||
for(var/scriptError/e in compileerrors)
|
||||
M << output("<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
M << output("([compileerrors.len] errors)", "tcserror")
|
||||
to_chat(M, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(M, output("([compileerrors.len] errors)", "tcserror"))
|
||||
|
||||
|
||||
else
|
||||
src << output("<font color = blue>TCS compilation successful!</font>", "tcserror")
|
||||
src << output("(0 errors)", "tcserror")
|
||||
to_chat(src, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
|
||||
to_chat(src, output("(0 errors)", "tcserror"))
|
||||
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
M << output("<font color = blue>TCS compilation successful!</font>", "tcserror")
|
||||
M << output("(0 errors)", "tcserror")
|
||||
to_chat(M, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
|
||||
to_chat(M, output("(0 errors)", "tcserror"))
|
||||
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
|
||||
client/verb/tcsrun()
|
||||
set hidden = 1
|
||||
@@ -90,32 +90,32 @@ client/verb/tcsrun()
|
||||
var/list/compileerrors = Server.compile() // then compile the code!
|
||||
|
||||
// Output all the compile-time errors
|
||||
src << output(null, "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
|
||||
if(compileerrors.len)
|
||||
src << output("<b>Compile Errors</b>", "tcserror")
|
||||
to_chat(src, output("<b>Compile Errors</b>", "tcserror"))
|
||||
for(var/scriptError/e in compileerrors)
|
||||
src << output("<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
src << output("([compileerrors.len] errors)", "tcserror")
|
||||
to_chat(src, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(src, output("([compileerrors.len] errors)", "tcserror"))
|
||||
|
||||
// Output compile errors to all other people viewing the code too
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
M << output(null, "tcserror")
|
||||
M << output("<b>Compile Errors</b>", "tcserror")
|
||||
to_chat(M, output(null, "tcserror"))
|
||||
to_chat(M, output("<b>Compile Errors</b>", "tcserror"))
|
||||
for(var/scriptError/e in compileerrors)
|
||||
M << output("<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
M << output("([compileerrors.len] errors)", "tcserror")
|
||||
to_chat(M, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(M, output("([compileerrors.len] errors)", "tcserror"))
|
||||
|
||||
else
|
||||
// Finally, we run the code!
|
||||
src << output("<font color = blue>TCS compilation successful! Code executed.</font>", "tcserror")
|
||||
src << output("(0 errors)", "tcserror")
|
||||
to_chat(src, output("<font color = blue>TCS compilation successful! Code executed.</font>", "tcserror"))
|
||||
to_chat(src, output("(0 errors)", "tcserror"))
|
||||
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
M << output("<font color = blue>TCS compilation successful!</font>", "tcserror")
|
||||
M << output("(0 errors)", "tcserror")
|
||||
to_chat(M, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
|
||||
to_chat(M, output("(0 errors)", "tcserror"))
|
||||
|
||||
var/datum/signal/signal = new()
|
||||
signal.data["message"] = ""
|
||||
@@ -132,14 +132,14 @@ client/verb/tcsrun()
|
||||
|
||||
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror"))
|
||||
|
||||
|
||||
client/verb/exittcs()
|
||||
@@ -171,16 +171,16 @@ client/verb/tcsrevert()
|
||||
|
||||
winset(mob, "tcscode", "text=\"[showcode]\"")
|
||||
|
||||
src << output(null, "tcserror") // clear the errors
|
||||
to_chat(src, output(null, "tcserror")) // clear the errors)
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to revert: Unable to locate server machine.</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to revert: Unable to locate server machine.</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror"))
|
||||
|
||||
|
||||
client/verb/tcsclearmem()
|
||||
@@ -195,17 +195,17 @@ client/verb/tcsclearmem()
|
||||
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
|
||||
Server.memory = list() // clear the memory
|
||||
// Show results
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = blue>Server memory cleared!</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = blue>Server memory cleared!</font>", "tcserror"))
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
M << output("<font color = blue>Server memory cleared!</font>", "tcserror")
|
||||
to_chat(M, output("<font color = blue>Server memory cleared!</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to clear memory: Unable to locate server machine.</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate server machine.</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror"))
|
||||
else
|
||||
src << output(null, "tcserror")
|
||||
src << output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror")
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror"))
|
||||
|
||||
Reference in New Issue
Block a user