Fixes a lua state null return related to the print wrapper, improves the lua editor ui formatting, and implements a stopgap lua lag fix (#68816)

This PR fixes this issue by making sure every proc called in the stack of /proc/wrap_lua_print which could sleep is called using INVOKE_ASYNC, and to prevent such problems in the future, marks all the wrappers as SHOULD_NOT_SLEEP(TRUE). I also figured out how to fix the dumb overflowing problem of the lua editor ui.

Due to lag concerns regarding lua states with a large number of global variables (including fields within global tables), I have made it so the global table and state log are hidden by default - they can be shown using a toggle button in the editor ui.
This commit is contained in:
Y0SH1M4S73R
2022-07-31 03:09:01 -04:00
committed by GitHub
parent 18ce9e2460
commit e72ec7445a
6 changed files with 90 additions and 45 deletions
+2 -5
View File
@@ -138,10 +138,7 @@ SUBSYSTEM_DEF(lua)
break
// Update every lua editor TGUI open for each state that had a task awakened or resumed
for(var/state in affected_states)
var/list/editor_list = LAZYACCESS(editors, "\ref[state]")
if(editor_list)
for(var/datum/lua_editor/editor in editor_list)
SStgui.update_uis(editor)
for(var/datum/lua_state/state in affected_states)
INVOKE_ASYNC(state, /datum/lua_state.proc/update_editors)
#undef SSLUA_INIT_FAILED