mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-02-05 14:09:25 +00:00
this is a bit of https://github.com/cmss13-devs/cmss13/pull/8646 https://github.com/cmss13-devs/cmss13/pull/8875 https://github.com/cmss13-devs/cmss13/pull/8606 https://github.com/cmss13-devs/cmss13/pull/8607 https://github.com/cmss13-devs/cmss13/pull/8359 https://github.com/cmss13-devs/cmss13/pull/7860 ( and thus https://github.com/ParadiseSS13/Paradise/pull/25105 https://github.com/ParadiseSS13/Paradise/pull/25205 https://github.com/ParadiseSS13/Paradise/pull/25363 https://github.com/ParadiseSS13/Paradise/pull/26423 and https://github.com/ParadiseSS13/Paradise/pull/26433 ) https://github.com/tgstation/tgstation/pull/89766 in order to work properly - using the efficient storage method, instead of the byond json method - github pages needs to be enabled and built from the gh-pages branch. because yeah --------- Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
28 lines
731 B
Plaintext
28 lines
731 B
Plaintext
GLOBAL_LIST_EMPTY(chemical_reaction_logs)
|
|
|
|
/proc/log_chemical_reaction(atom/A, datum/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*"]"
|
|
|
|
GLOB.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"
|
|
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
|
|
var/html = ""
|
|
for(var/entry in GLOB.chemical_reaction_logs)
|
|
html += "[entry]<br>"
|
|
|
|
usr << browse(HTML_SKELETON(html), "window=chemlogs")
|