mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Refactors logging into a single var for all mobs and adds a wrapper for proper logging.
This commit is contained in:
@@ -1,30 +1,27 @@
|
||||
/proc/show_individual_logging_panel(mob/M, type = "attack")
|
||||
/proc/show_individual_logging_panel(mob/M, type = INDIVIDUAL_ATTACK_LOG)
|
||||
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> | "
|
||||
var/dat = "<center><a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_ATTACK_LOG]'>Attack log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_SAY_LOG]'>Say log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_EMOTE_LOG]'>Emote log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_OOC_LOG]'>OOC log</a> | "
|
||||
dat += "<a href='?_src_=holder;individuallog=\ref[M];log_type=[INDIVIDUAL_SHOW_ALL_LOG]'>Show all</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>"
|
||||
if((type in M.logging) && type != INDIVIDUAL_SHOW_ALL_LOG)
|
||||
dat += "<center>[type] of [key_name(M)]</center><br>"
|
||||
for(var/entry in M.logging[type])
|
||||
dat += "<font size=3px>[entry]: [M.logging[type][entry]]</font><br>"
|
||||
|
||||
else if(type == INDIVIDUAL_SHOW_ALL_LOG)
|
||||
dat += "<center>Displaying all logs of [key_name(M)]</center><br><hr>"
|
||||
for(var/log_type in M.logging)
|
||||
dat += "<center>[log_type]</center><br>"
|
||||
for(var/entry in M.logging[log_type])
|
||||
dat += "<font size=3px>[entry]: [M.logging[log_type][entry]]</font><br>"
|
||||
dat += "<hr>"
|
||||
|
||||
|
||||
usr << browse(dat, "window=invidual_logging;size=600x480")
|
||||
@@ -664,16 +664,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_attack_log(mob/M in mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Attack Log"
|
||||
|
||||
usr << "<span class='boldannounce'>Attack Log for [mob]</span>"
|
||||
for(var/t in M.attack_log)
|
||||
usr << t
|
||||
feedback_add_details("admin_verb","ATTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/everyone_random()
|
||||
set category = "Fun"
|
||||
set name = "Make Everyone Random"
|
||||
|
||||
Reference in New Issue
Block a user