toml parser update + 'toml' module is built-in now

This commit is contained in:
MihailRis
2024-05-20 01:28:42 +03:00
parent ffdeac5c1f
commit c94d40ab02
15 changed files with 252 additions and 178 deletions
+2 -2
View File
@@ -20,13 +20,13 @@ namespace scripting {
using namespace scripting;
static int l_keycode(lua_State* L) {
const char* name = lua_tostring(L, 1);
const char* name = state->requireString(1);
lua_pushinteger(L, static_cast<int>(input_util::keycode_from(name)));
return 1;
}
static int l_add_callback(lua_State* L) {
auto bindname = lua_tostring(L, 1);
auto bindname = state->requireString(1);
const auto& bind = Events::bindings.find(bindname);
if (bind == Events::bindings.end()) {
throw std::runtime_error("unknown binding "+util::quote(bindname));