locale independent util::parse_double

This commit is contained in:
MihailRis
2024-02-02 20:02:30 +03:00
parent 84e8fd1af6
commit bc72742ee3
20 changed files with 140 additions and 48 deletions
+14
View File
@@ -101,6 +101,20 @@ void scripting::initialize(Engine* engine) {
load_script(fs::path("stdlib.lua"));
}
// todo: luaL state check
runnable scripting::create_runnable(
const std::string& filename,
const std::string& src
) {
return [=](){
if (luaL_loadbuffer(L, src.c_str(), src.length(), filename.c_str())) {
handleError(L);
return;
}
call_func(L, 0, filename);
};
}
void scripting::on_world_load(Level* level, BlocksController* blocks) {
scripting::level = level;
scripting::content = level->content;