mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 08:56:49 +01:00
Ports Goonchat from Baystation. (#9635)
changes:
rscadd: "Ported a new chat system, Goonchat, that allows for cool things like changing font style, size, spacing, highlighting up to 5 strings in the chat, and DARK MODE."
rscadd: "Repeated chat messages can now get compacted. You can disable this in goonchat settings."
rscadd: "You can change icon style to any font on your system."
tweak: "The game window has been altered a bit to adjust for this."
rscdel: "Removed skin style prefs as they are no longer used."
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
|
||||
to_chat(src, output(null, "tcserror")) // clear the errors)
|
||||
send_output(src, null, "tcserror") // clear the errors)
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to save: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to save: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<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
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
|
||||
if(compileerrors.len)
|
||||
to_chat(src, output("<b>Compile Errors</b>", "tcserror"))
|
||||
to_chat(src, "<b>Compile Errors</b>", "tcserror")
|
||||
for(var/scriptError/e in compileerrors)
|
||||
to_chat(src, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(src, output("([compileerrors.len] errors)", "tcserror"))
|
||||
send_output(src, "<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
send_output(src, "([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)
|
||||
to_chat(M, output(null, "tcserror"))
|
||||
to_chat(M, output("<b>Compile Errors</b>", "tcserror"))
|
||||
send_output(M, null, "tcserror")
|
||||
send_output(M, "<b>Compile Errors</b>", "tcserror")
|
||||
for(var/scriptError/e in compileerrors)
|
||||
to_chat(M, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(M, output("([compileerrors.len] errors)", "tcserror"))
|
||||
send_output(M, "<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
send_output(M, "([compileerrors.len] errors)", "tcserror")
|
||||
|
||||
|
||||
else
|
||||
to_chat(src, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
|
||||
to_chat(src, output("(0 errors)", "tcserror"))
|
||||
send_output(src, "<font color = blue>TCS compilation successful!</font>", "tcserror")
|
||||
send_output(src, "(0 errors)", "tcserror")
|
||||
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
to_chat(M, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
|
||||
to_chat(M, output("(0 errors)", "tcserror"))
|
||||
send_output(M, "<font color = blue>TCS compilation successful!</font>", "tcserror")
|
||||
send_output(M, "(0 errors)", "tcserror")
|
||||
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to compile: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to compile: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<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,31 @@ client/verb/tcsrun()
|
||||
var/list/compileerrors = Server.compile() // then compile the code!
|
||||
|
||||
// Output all the compile-time errors
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
|
||||
if(compileerrors.len)
|
||||
to_chat(src, output("<b>Compile Errors</b>", "tcserror"))
|
||||
send_output(src, "<b>Compile Errors</b>", "tcserror")
|
||||
for(var/scriptError/e in compileerrors)
|
||||
to_chat(src, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(src, output("([compileerrors.len] errors)", "tcserror"))
|
||||
send_output(src, "<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
send_output(src, "([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)
|
||||
to_chat(M, output(null, "tcserror"))
|
||||
to_chat(M, output("<b>Compile Errors</b>", "tcserror"))
|
||||
send_output(M, null, "tcserror")
|
||||
send_output(M, "<b>Compile Errors</b>", "tcserror")
|
||||
for(var/scriptError/e in compileerrors)
|
||||
to_chat(M, output("<font color = red>\t>[e.message]</font>", "tcserror"))
|
||||
to_chat(M, output("([compileerrors.len] errors)", "tcserror"))
|
||||
|
||||
send_output(M, "<font color = red>\t>[e.message]</font>", "tcserror")
|
||||
send_output(M, "([compileerrors.len] errors)", "tcserror")
|
||||
else
|
||||
// Finally, we run the code!
|
||||
to_chat(src, output("<font color = blue>TCS compilation successful! Code executed.</font>", "tcserror"))
|
||||
to_chat(src, output("(0 errors)", "tcserror"))
|
||||
send_output(src, "<font color = blue>TCS compilation successful! Code executed.</font>", "tcserror")
|
||||
send_output(src, "(0 errors)", "tcserror")
|
||||
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
to_chat(M, output("<font color = blue>TCS compilation successful!</font>", "tcserror"))
|
||||
to_chat(M, output("(0 errors)", "tcserror"))
|
||||
send_output(M, "<font color = blue>TCS compilation successful!</font>", "tcserror")
|
||||
send_output(M, "(0 errors)", "tcserror")
|
||||
|
||||
var/datum/signal/signal = new()
|
||||
signal.data["message"] = ""
|
||||
@@ -132,14 +131,14 @@ client/verb/tcsrun()
|
||||
|
||||
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to run: Unable to locate server machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to run: Unable to locate machine. (Back up your code before exiting the window!)</font>", "tcserror")
|
||||
else
|
||||
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"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<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 +170,16 @@ client/verb/tcsrevert()
|
||||
|
||||
winset(mob, "tcscode", "text=\"[showcode]\"")
|
||||
|
||||
to_chat(src, output(null, "tcserror")) // clear the errors)
|
||||
send_output(src, null, "tcserror") // clear the errors
|
||||
else
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to revert: Unable to locate server machine.</font>", "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to revert: Unable to locate server machine.</font>", "tcserror")
|
||||
else
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror")
|
||||
else
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to revert: Unable to locate machine.</font>", "tcserror")
|
||||
|
||||
|
||||
client/verb/tcsclearmem()
|
||||
@@ -195,17 +194,17 @@ client/verb/tcsclearmem()
|
||||
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
|
||||
Server.memory = list() // clear the memory
|
||||
// Show results
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = blue>Server memory cleared!</font>", "tcserror"))
|
||||
to_chat(src, null, "tcserror")
|
||||
to_chat(src, "<font color = blue>Server memory cleared!</font>", "tcserror")
|
||||
for(var/mob/M in Machine.viewingcode)
|
||||
if(M.client)
|
||||
to_chat(M, output("<font color = blue>Server memory cleared!</font>", "tcserror"))
|
||||
send_output(M, "<font color = blue>Server memory cleared!</font>", "tcserror")
|
||||
else
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate server machine.</font>", "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to clear memory: Unable to locate server machine.</font>", "tcserror")
|
||||
else
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror")
|
||||
else
|
||||
to_chat(src, output(null, "tcserror"))
|
||||
to_chat(src, output("<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror"))
|
||||
send_output(src, null, "tcserror")
|
||||
send_output(src, "<font color = red>Failed to clear memory: Unable to locate machine.</font>", "tcserror")
|
||||
|
||||
Reference in New Issue
Block a user