mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
Merge branch 'main' of https://github.com/MihailRis/VoxelEngine-Cpp
This commit is contained in:
commit
ba12642a24
2 changed files with 10 additions and 4 deletions
|
|
@ -280,10 +280,18 @@ void create_new_world_panel(Engine* engine, PagesControl* menu) {
|
|||
std::cout << "world seed: " << seed << std::endl;
|
||||
|
||||
auto folder = paths->getWorldsFolder()/fs::u8path(nameutf8);
|
||||
|
||||
try {
|
||||
engine->loadAllPacks();
|
||||
engine->loadContent();
|
||||
} catch (const std::runtime_error& error) {
|
||||
guiutil::alert(engine->getGUI(),
|
||||
langs::get(L"Content Error", L"menu")+
|
||||
L": "+util::str2wstr_utf8(error.what()));
|
||||
return;
|
||||
}
|
||||
fs::create_directories(folder);
|
||||
|
||||
engine->loadAllPacks();
|
||||
engine->loadContent();
|
||||
Level* level = World::create(
|
||||
nameutf8, folder, seed,
|
||||
engine->getSettings(),
|
||||
|
|
|
|||
|
|
@ -14,13 +14,11 @@
|
|||
#include "../../lighting/Lighting.h"
|
||||
#include "../../logic/BlocksController.h"
|
||||
|
||||
#if (LUA_VERSION_NUM < 502)
|
||||
inline void luaL_openlib(lua_State* L, const char* name, const luaL_Reg* libfuncs, int nup) {
|
||||
lua_newtable(L);
|
||||
luaL_setfuncs(L, libfuncs, nup);
|
||||
lua_setglobal(L, name);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* == world library ==*/
|
||||
static int l_world_get_day_time(lua_State* L) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue