mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
29 lines
724 B
Plaintext
29 lines
724 B
Plaintext
|
|
/var/list/chemical_reaction_logs = list()
|
|
|
|
/proc/log_chemical_reaction(atom/A, decl/chemical_reaction/R, multiplier)
|
|
if(!A || !R)
|
|
return
|
|
|
|
var/turf/T = get_turf(A)
|
|
var/logstr = "[usr ? key_name(usr) : "EVENT"] mixed [R.name] ([R.result]) (x[multiplier]) in \the [A] at [T ? "[T.x],[T.y],[T.z]" : "*null*"]"
|
|
|
|
chemical_reaction_logs += "\[[time_stamp()]\] [logstr]"
|
|
|
|
if(R.log_is_important)
|
|
message_admins(logstr)
|
|
log_admin(logstr)
|
|
|
|
/client/proc/view_chemical_reaction_logs()
|
|
set name = "Show Chemical Reactions"
|
|
set category = "Admin.Investigate"
|
|
|
|
if(!check_rights(R_ADMIN|R_MOD))
|
|
return
|
|
|
|
var/html = ""
|
|
for(var/entry in chemical_reaction_logs)
|
|
html += "[entry]<br>"
|
|
|
|
usr << browse(html, "window=chemlogs")
|