From dd012eba8093108e140d7bc746158f1bc9c2f8ec Mon Sep 17 00:00:00 2001 From: "giacomand@gmail.com" Date: Fri, 8 Feb 2013 00:25:00 +0000 Subject: [PATCH] - Fixed the admin warning of an NTSL script only being shown on the "apply" button. - Re-named the IDE "apply" button to "save". git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5665 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/telecomms/telecomunications.dm | 9 ++++++++- code/modules/scripting/IDE.dm | 7 ++----- interface/skin.dmf | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 0a6c8b8f71e..7ae72fa6e56 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -593,8 +593,15 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() if(istext(t)) rawcode = t -/obj/machinery/telecomms/server/proc/compile() +/obj/machinery/telecomms/server/proc/admin_log(var/mob/mob) + var/msg="[mob.name] has compiled a script to server [src]:" + diary << msg + diary << rawcode + message_admins("[mob.name] has compiled and uploaded a NTLS script to [src] ([mob.x],[mob.y],[mob.z] - JMP)",0,1) + +/obj/machinery/telecomms/server/proc/compile(var/mob/user) if(Compiler) + admin_log(user) return Compiler.Compile(rawcode) /obj/machinery/telecomms/server/proc/update_logs() diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm index b9b53b274d2..b886f1b7441 100644 --- a/code/modules/scripting/IDE.dm +++ b/code/modules/scripting/IDE.dm @@ -9,9 +9,6 @@ client/verb/tcssave() if(Machine.SelectedServer) var/obj/machinery/telecomms/server/Server = Machine.SelectedServer var/tcscode=winget(src, "tcscode", "text") - var/msg="[mob.name] is adding script to server [Server]: [tcscode]" - diary << msg - message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - JMP)",0,1) Server.setcode( tcscode ) // this actually saves the code from input to the server src << output(null, "tcserror") // clear the errors else @@ -36,7 +33,7 @@ client/verb/tcscompile() if(Machine.SelectedServer) var/obj/machinery/telecomms/server/Server = Machine.SelectedServer Server.setcode( winget(src, "tcscode", "text") ) // save code first - var/list/compileerrors = Server.compile() // then compile the code! + var/list/compileerrors = Server.compile(mob) // then compile the code! // Output all the compile-time errors src << output(null, "tcserror") @@ -87,7 +84,7 @@ client/verb/tcsrun() if(Machine.SelectedServer) var/obj/machinery/telecomms/server/Server = Machine.SelectedServer Server.setcode( winget(src, "tcscode", "text") ) // save code first - var/list/compileerrors = Server.compile() // then compile the code! + var/list/compileerrors = Server.compile(mob) // then compile the code! // Output all the compile-time errors src << output(null, "tcserror") diff --git a/interface/skin.dmf b/interface/skin.dmf index cb59325537b..ca8b327c2fa 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -726,7 +726,7 @@ window "Telecomms IDE" right-click = false saved-params = "is-checked" on-size = "" - text = "Apply" + text = "Save" image = "" command = "tcssave" is-flat = false