mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix gui.alert
This commit is contained in:
parent
9443892406
commit
b12982655d
4 changed files with 37 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue