mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
disable debugging if server is not running & make detach complete
This commit is contained in:
parent
1a7bcf9865
commit
d861595f78
2 changed files with 53 additions and 33 deletions
|
|
@ -376,6 +376,10 @@ static int l_debug_pull_events(lua::State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int l_debug_is_debugging(lua::State* L) {
|
||||
return lua::pushboolean(L, engine->getDebuggingServer() != nullptr);
|
||||
}
|
||||
|
||||
void initialize_libs_extends(lua::State* L) {
|
||||
if (lua::getglobal(L, "debug")) {
|
||||
lua::pushcfunction(L, lua::wrap<l_debug_error>);
|
||||
|
|
@ -399,6 +403,9 @@ void initialize_libs_extends(lua::State* L) {
|
|||
lua::pushcfunction(L, lua::wrap<l_debug_sendvalue>);
|
||||
lua::setfield(L, "__sendvalue");
|
||||
|
||||
lua::pushcfunction(L, lua::wrap<l_debug_is_debugging>);
|
||||
lua::setfield(L, "is_debugging");
|
||||
|
||||
lua::pop(L);
|
||||
}
|
||||
if (lua::getglobal(L, "math")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue