mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user