Adds a way to see a persons's individual logs for the round.

This commit is contained in:
Lzimann
2017-03-03 22:03:13 -03:00
parent 061ac45972
commit 15e8b7e5f7
8 changed files with 51 additions and 5 deletions

View File

@@ -64,6 +64,7 @@ var/global/list/emote_list = list()
else
user.visible_message(msg)
log_emote("[key_name(user)] : [msg]")
user.emote_log += "\[[time_stamp()]\] [msg]"
/datum/emote/proc/select_message_type(mob/user)
. = message

View File

@@ -82,7 +82,8 @@ var/global/BSACooldown = 0
body += "<br><br>"
body += "<A href='?_src_=holder;traitor=\ref[M]'>Traitor panel</A> | "
body += "<A href='?_src_=holder;narrateto=\ref[M]'>Narrate to</A> | "
body += "<A href='?_src_=holder;subtlemessage=\ref[M]'>Subtle message</A>"
body += "<A href='?_src_=holder;subtlemessage=\ref[M]'>Subtle message</A> | "
body += "<A href='?_src_=holder;individuallog=\ref[M]'>Individual Round Logs</A>"
if (M.client)
if(!isnewplayer(M))

View File

@@ -1820,6 +1820,17 @@
var/mob/M = locate(href_list["subtlemessage"])
usr.client.cmd_admin_subtle_message(M)
else if(href_list["individuallog"])
if(!check_rights(R_ADMIN))
return
var/mob/M = locate(href_list["individuallog"]) in mob_list
if(!ismob(M))
usr << "This can only be used on instances of type /mob."
return
show_individual_logging_panel(M, href_list["log_type"])
else if(href_list["traitor"])
if(!check_rights(R_ADMIN))
return

View File

@@ -0,0 +1,30 @@
/proc/show_individual_logging_panel(mob/M, type = "attack")
if(!M || !ismob(M))
return
var/dat = "<center><a href='?_src_=holder;individuallog=\ref[M];log_type=attack'>Attack log</a> | "
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=say'>Say log</a> | "
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=emote'>Emote log</a> | "
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=ooc'>OOC log</a> | "
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[type]'>Refresh</a></center>"
dat += "<hr style='background:#000000; border:0; height:1px'>"
switch(type)
if("attack")
dat += "<center>Attack logs of [key_name(M)]</center><br>"
for(var/entry in M.attack_log)
dat += "<font size='2px'>[entry]</font><br><hr>"
if("say")
dat += "<center>Say logs of [key_name(M)]</center><br>"
for(var/entry in M.say_log)
dat += "<font size='3px'>[entry] [M.say_log[entry]]</font><br><hr>"
if("emote")
dat += "<center>Emote logs of [key_name(M)]</center><br>"
for(var/entry in M.emote_log)
dat += "<font size='3px'>[entry]</font><br><hr>"
if("ooc")
dat += "<center>OOC logs of [key_name(M)]</center><br>"
for(var/entry in M.ooc_log)
dat += "<font size='3px'>[entry]</font><br><hr>"
usr << browse(dat, "window=invidual_logging;size=600x480")

View File

@@ -52,6 +52,7 @@
return
log_ooc("[mob.name]/[key] : [raw_msg]")
mob.ooc_log += "\[[time_stamp()]\] [raw_msg]"
var/keyname = key
if(prefs.unlock_content)

View File

@@ -54,8 +54,6 @@
var/smoke_delay = 0 //used to prevent spam with smoke reagent reaction on mob.
var/list/say_log = list() //a log of what we've said, with a timestamp as the key for each message
var/bubble_icon = "default" //what icon the mob uses for speechbubbles
var/last_bumped = 0

View File

@@ -26,7 +26,10 @@
var/computer_id = null
var/lastattacker = null
var/lastattacked = null
var/attack_log = list( )
var/list/attack_log = list()
var/list/say_log = list() //a log of what we've said, with a timestamp as the key for each message
var/list/ooc_log = list()
var/list/emote_log = list()
var/obj/machinery/machine = null
var/other_mobs = null
var/disabilities = 0 //Carbon

View File

@@ -14,7 +14,7 @@
// BEGIN_INCLUDE
#include "_maps\__MAP_DEFINES.dm"
#include "_maps\tgstation2.dm"
#include "_maps\runtimestation.dm"
#include "code\_compile_options.dm"
#include "code\world.dm"
#include "code\__DATASTRUCTURES\heap.dm"
@@ -974,6 +974,7 @@
#include "code\modules\admin\verbs\diagnostics.dm"
#include "code\modules\admin\verbs\fps.dm"
#include "code\modules\admin\verbs\getlogs.dm"
#include "code\modules\admin\verbs\indidivual_loggings.dm"
#include "code\modules\admin\verbs\machine_upgrade.dm"
#include "code\modules\admin\verbs\manipulate_organs.dm"
#include "code\modules\admin\verbs\map_template_loadverb.dm"