fix gui.alert

This commit is contained in:
MihailRis
2025-01-21 09:39:06 +03:00
parent 9443892406
commit b12982655d
4 changed files with 37 additions and 16 deletions
+16 -2
View File
@@ -37,7 +37,10 @@ local function complete_app_lib(app)
app.tick = coroutine.yield
app.get_version = core.get_version
app.get_setting_info = core.get_setting_info
app.load_content = core.load_content
app.load_content = function()
core.load_content()
app.tick()
end
app.reset_content = core.reset_content
app.is_content_loaded = core.is_content_loaded
@@ -416,7 +419,18 @@ end
function start_coroutine(chunk, name)
local co = coroutine.create(function()
local status, error = xpcall(chunk, __vc__error)
local status, error = xpcall(chunk, function(...)
gui.alert(debug.traceback(), function()
if world.is_open() then
__vc_app.close_world()
else
__vc_app.reset_content()
menu:reset()
menu.page = "main"
end
end)
return ...
end)
if not status then
debug.error(error)
end