Fixes/improves the Lua UI Slightly (#85447)

## About The Pull Request

A couple of fixes/updates watermelon asked for. Of particular note is
the ability to suppress logging runtimes that the state was involved in
causing.

## Why It's Good For The Game

There were a few formatting issues caused by converting the UI to React
Typescript. As for suppressing runtime logging, sometimes the runtimes
being logged aren't important to the lua code being run, so it would
make sense to toggle whether such runtimes should be saved to a state's
log.

## Changelog

🆑
admin: The layout of the lua editor has been tweaked slightly.
admin: In the lua editor, you can now toggle whether to log runtimes the
viewed state is involved in.
/🆑
This commit is contained in:
Y0SH1M4S73R
2024-08-01 10:45:37 -04:00
committed by GitHub
parent 296db2a418
commit 20361ace13
5 changed files with 99 additions and 80 deletions
+5 -1
View File
@@ -75,6 +75,7 @@
if(last_error)
data["lastError"] = last_error
last_error = null
data["supressRuntimes"] = current_state.supress_runtimes
data["states"] = list()
for(var/datum/lua_state/state as anything in SSlua.states)
data["states"] += state.display_name
@@ -228,7 +229,7 @@
if(result["status"] == "error")
last_error = result["message"]
arguments.Cut()
return TRUE
return
if("resumeTask")
var/task_index = params["index"]
SSlua.queue_resume(current_state, task_index, arguments)
@@ -261,6 +262,9 @@
if("toggleShowGlobalTable")
show_global_table = !show_global_table
return TRUE
if("toggleSupressRuntimes")
current_state.supress_runtimes = !current_state.supress_runtimes
return TRUE
if("nextPage")
page = min(page+1, CEILING(current_state.log.len/50, 1)-1)
return TRUE