Added a new logging system that can be used for various things in the game (such as the singularity engine, AI interactions, anything-else that may be suggested to me :P).

At the moment it only logs some singularity things. Please let me know if there are any important methods of singulo-grief which I may have missed.

The "Investigate" verb is available to everyone of rank "Admin observer" and upwards. Just type "Investigate" and select the subject you'd like to see logs for. Typing "Investigate singulo" will also work as a shortcut.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3679 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-05-27 01:31:57 +00:00
parent 6b9895ecb4
commit d7c9e72a29
14 changed files with 100 additions and 32 deletions
+43
View File
@@ -0,0 +1,43 @@
//By Carnwennan
//This system was made as an alternative to all the in-game lists and variables used to log stuff in-game.
//lists and variables are great. However, they have several major flaws:
//Firstly, they use memory. TGstation has one of the highest memory usage of all the ss13 branches.
//Secondly, they are usually stored in an object. This means that they aren't centralised. It also means that
//the data is lost when the object is deleted! This is especially annoying for things like the singulo engine!
#define INVESTIGATE_DIR "data/investigate/"
//SYSTEM
/proc/investigate_subject2file(var/subject)
switch(subject)
if("singulo")
return file("[INVESTIGATE_DIR]singulo.html")
if("silicon")
return file("[INVESTIGATE_DIR]silicon.html")
else
return
/proc/investigate_reset()
if(fdel(INVESTIGATE_DIR)) return 1
return 0
/atom/proc/investigate_log(var/message, var/subject)
if(!message) return
var/F = investigate_subject2file(subject)
if(!F) return
F << "[src] \ref[src] ([x],[y],[z]) [message]<br>"
//ADMINVERBS
/client/proc/investigate_show( subject in list("singulo","silicon") )
set name = "Investigate"
set category = "Admin"
if(!holder) return
var/F = investigate_subject2file(subject)
if(!F)
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
return
src << browse(F,"window=investigate;title='investigate [subject]'")
+3 -1
View File
@@ -102,6 +102,7 @@
//Admin Observer
if (holder.level >= -1)
verbs += /client/proc/investigate_show
verbs += /client/proc/cmd_admin_say
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/deadmin_self
@@ -400,10 +401,11 @@
verbs -= /client/proc/jumptocoord
verbs -= /client/proc/everyone_random
verbs -= /client/proc/Set_Holiday
verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs
verbs -= /client/proc/getserverlog
verbs -= /client/proc/cinematic //show a cinematic sequence
verbs -= /client/proc/admin_memo
verbs -= /client/proc/investigate_show //investigate in-game mishaps using various logs.
verbs -= /proc/possess
verbs -= /proc/release
//verbs -= /client/proc/give_spell --Merged with view variables