Merge branch 'main' into debugging-client

This commit is contained in:
MihailRis 2025-11-19 20:14:21 +03:00
commit 4d82fb7873
30 changed files with 560 additions and 135 deletions

View file

@ -730,7 +730,7 @@ static int l_pull_register_events(lua::State* L) {
lua::createtable(L, events.size() * 4, 0);
for (int i = 0; i < events.size(); i++) {
const auto& event = events[i];
lua::pushinteger(L, static_cast<int>(event.type) | event.id << 16);
lua::pushinteger(L, static_cast<int>(event.bits) | event.id << 16);
lua::rawseti(L, i * 4 + 1);
for (int j = 0; j < 3; j++) {

View file

@ -120,6 +120,7 @@ static int l_close_world(lua::State* L) {
if (controller == nullptr) {
throw std::runtime_error("no world open");
}
controller->processBeforeQuit();
bool save_world = lua::toboolean(L, 1);
if (save_world) {
controller->saveWorld();