Fix scripts not getting loaded from xlabs folder

This commit is contained in:
Federico Cecchetto 2022-03-10 00:24:30 +01:00
parent 26640a977f
commit 0efad73186
2 changed files with 3 additions and 4 deletions

View File

@ -2,5 +2,5 @@ if (game:issingleplayer()) then
return
end
require("settings")
require("hud")
include("settings")
include("hud")

View File

@ -79,7 +79,6 @@ namespace ui_scripting::lua
userdata.set("new", convert({s, value}));
}
);
userdata_type["get"] = [](const userdata& userdata, const sol::this_state s,
const sol::lua_value& key)
@ -102,7 +101,7 @@ namespace ui_scripting::lua
userdata_type[sol::meta_function::new_index] = [](const userdata& userdata, const sol::this_state s,
const sol::lua_value& key, const sol::lua_value& value)
{
userdata.set(convert({s, key }), convert({s, value}));
userdata.set(convert({s, key}), convert({s, value}));
};
auto table_type = state.new_usertype<table>("table_");