Files
GS13NG/code/modules/admin/admin_investigate.dm
Poojawa 7e9b96a00f April sync (#360)
* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
2017-04-13 23:37:00 -05:00

51 lines
2.0 KiB
Plaintext

//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(subject)
return file("[INVESTIGATE_DIR][subject].html")
/proc/investigate_reset()
if(fdel(INVESTIGATE_DIR))
return 1
return 0
/atom/proc/investigate_log(message, subject)
if(!message)
return
var/F = investigate_subject2file(subject)
if(!F)
return
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
//ADMINVERBS
/client/proc/investigate_show( subject in list("hrefs","notes, memos, watchlist","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter", "atmos", "experimentor", "kudzu") )
set name = "Investigate"
set category = "Admin"
if(!holder)
return
switch(subject)
if("singulo", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos", "botany") //general one-round-only stuff
var/F = investigate_subject2file(subject)
if(!F)
to_chat(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[subject];size=800x300")
if("hrefs") //persistent logs and stuff
if(GLOB.href_logfile)
src << browse(GLOB.href_logfile,"window=investigate[subject];size=800x300")
else if(!config.log_hrefs)
to_chat(src, "<span class='danger'>Href logging is off and no logfile was found.</span>")
return
else
to_chat(src, "<span class='danger'>No href logfile was found.</span>")
return
if("notes, memos, watchlist")
browse_messages()