mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[Ready for Review] Admin lua scripting (#65635) Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Y0SH1M4S73R <legoboyo@earthlink.net> Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
co-authored by
Mothblocks
Y0SH1M4S73R
parent
cc051b4cb4
commit
15a223ff2d
@@ -2003,3 +2003,22 @@
|
||||
if(!datum_to_mark)
|
||||
return
|
||||
return usr.client?.mark_datum(datum_to_mark)
|
||||
|
||||
else if(href_list["lua_state"])
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/datum/lua_state/state_to_view = locate(href_list["lua_state"])
|
||||
if(!state_to_view)
|
||||
return
|
||||
var/datum/lua_editor/editor = new(state_to_view)
|
||||
var/log_index = href_list["log_index"]
|
||||
if(log_index)
|
||||
log_index = text2num(log_index)
|
||||
if(log_index <= state_to_view.log.len)
|
||||
var/list/log_entry = state_to_view.log[log_index]
|
||||
if(log_entry["chunk"])
|
||||
LAZYINITLIST(editor.tgui_shared_states)
|
||||
editor.tgui_shared_states["viewedChunk"] = json_encode(log_entry["chunk"])
|
||||
editor.tgui_shared_states["modal"] = json_encode("viewChunk")
|
||||
editor.ui_interact(usr)
|
||||
editor.tgui_shared_states = null
|
||||
|
||||
Reference in New Issue
Block a user