Individual Logs now follow the client around automatically (#37790)

The logging is now stored in the persistent client/player_details datum,
that will survive an entire round

The existing mob log is retained and a new admin verb is added to access
it. It will only show logs for the mob in question, across all players
who possibly spent time in that mob

A new log type is added that tracks the mobs the player changes across
into and the times they occured, to better help admins manage complex
situations, this also appears in the mob log as a record of the players
who entered/exited control of the mob
This commit is contained in:
oranges
2018-06-06 21:09:59 +12:00
committed by letterjay
parent 32b91ef798
commit de68aa9571
12 changed files with 55 additions and 26 deletions
@@ -79,7 +79,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
var/mob/body = loc
if(ismob(body))
T = get_turf(body) //Where is the body located?
logging = body.logging //preserve our logs by copying them to our ghost
gender = body.gender
if(body.mind && body.mind.name)
+1 -4
View File
@@ -48,7 +48,4 @@
for(var/datum/action/A in client.player_details.player_actions)
A.Grant(src)
if(!GLOB.individual_log_list[ckey])
GLOB.individual_log_list[ckey] = logging
else
logging = GLOB.individual_log_list[ckey]
log_message("Client [key_name(src)] has taken ownership of mob [src]", INDIVIDUAL_OWNERSHIP_LOG)
+2 -1
View File
@@ -1,4 +1,5 @@
/mob/Logout()
log_message("[key_name(src)] is no longer owning mob [src]", INDIVIDUAL_OWNERSHIP_LOG)
SStgui.on_logout(src)
unset_machine()
GLOB.player_list -= src
@@ -8,4 +9,4 @@
if(loc)
loc.on_log(FALSE)
return TRUE
return TRUE
+1
View File
@@ -785,6 +785,7 @@
//This will update a mob's name, real_name, mind.name, GLOB.data_core records, pda, id and traitor text
//Calling this proc without an oldname will only update the mob and skip updating the pda, id and records ~Carn
/mob/proc/fully_replace_character_name(oldname,newname)
log_message("[src] name changed from [oldname] to [newname]", INDIVIDUAL_OWNERSHIP_LOG)
if(!newname)
return 0
real_name = newname
+6
View File
@@ -477,12 +477,18 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(!LAZYLEN(message) || !message_type)
return
if(client)
if(!islist(client.player_details.logging[message_type]))
client.player_details.logging[message_type] = list()
if(!islist(logging[message_type]))
logging[message_type] = list()
var/list/timestamped_message = list("[LAZYLEN(logging[message_type]) + 1]\[[time_stamp()]\] [key_name(src)]" = message)
logging[message_type] += timestamped_message
if(client)
client.player_details.logging[message_type] += timestamped_message
/mob/proc/can_hear()
. = TRUE