mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
Ports upstream LUA PRs (#15200)
* 1 * Launch Dreamseeker is the default vscode launch config once again (#68666) Co-authored-by: William Wallace <me@wiox.me>
This commit is contained in:
@@ -38,6 +38,8 @@ GLOBAL_PROTECT(lua_usr)
|
||||
SSlua.sleeps += src
|
||||
|
||||
/datum/lua_state/proc/log_result(result, verbose = TRUE)
|
||||
if(!islist(result))
|
||||
return
|
||||
if(!verbose && result["status"] != "errored" && result["status"] != "bad return" \
|
||||
&& !(result["name"] == "input" && (result["status"] == "finished" || length(result["param"]))))
|
||||
return
|
||||
@@ -55,7 +57,7 @@ GLOBAL_PROTECT(lua_usr)
|
||||
append_to_log = FALSE
|
||||
break
|
||||
if(append_to_log)
|
||||
log += list(result)
|
||||
log += list(weakrefify_list(result))
|
||||
|
||||
/datum/lua_state/proc/load_script(script)
|
||||
GLOB.IsLuaCall = TRUE
|
||||
@@ -91,6 +93,10 @@ GLOBAL_PROTECT(lua_usr)
|
||||
if(istext(result))
|
||||
result = list("status" = "errored", "param" = result, "name" = islist(function) ? jointext(function, ".") : function)
|
||||
check_if_slept(result)
|
||||
var/list/editor_list = LAZYACCESS(SSlua.editors, "\ref[src]")
|
||||
if(editor_list)
|
||||
for(var/datum/lua_editor/editor in editor_list)
|
||||
SStgui.update_uis(editor)
|
||||
return result
|
||||
|
||||
/datum/lua_state/proc/call_function_return_first(function, ...)
|
||||
@@ -126,7 +132,7 @@ GLOBAL_PROTECT(lua_usr)
|
||||
return result
|
||||
|
||||
/datum/lua_state/proc/get_globals()
|
||||
globals = __lua_get_globals(internal_id)
|
||||
globals = weakrefify_list(__lua_get_globals(internal_id))
|
||||
|
||||
/datum/lua_state/proc/get_tasks()
|
||||
return __lua_get_tasks(internal_id)
|
||||
|
||||
Reference in New Issue
Block a user