mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
Merge branch 'main' into release-0.26
This commit is contained in:
commit
1731962339
14 changed files with 21 additions and 4 deletions
|
|
@ -148,7 +148,13 @@ static int l_reconfig_packs(lua::State* L) {
|
|||
lua::pop(L);
|
||||
}
|
||||
auto engineController = engine->getController();
|
||||
engineController->reconfigPacks(controller, addPacks, remPacks);
|
||||
try {
|
||||
engineController->reconfigPacks(controller, addPacks, remPacks);
|
||||
} catch (const contentpack_error& err) {
|
||||
throw std::runtime_error(
|
||||
std::string(err.what()) + " [" + err.getPackId() + " ]"
|
||||
);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,13 @@ static int l_pack_assemble(lua::State* L) {
|
|||
}
|
||||
auto manager = engine->createPacksManager(worldFolder);
|
||||
manager.scan();
|
||||
ids = std::move(manager.assemble(ids));
|
||||
try {
|
||||
ids = std::move(manager.assemble(ids));
|
||||
} catch (const contentpack_error& err) {
|
||||
throw std::runtime_error(
|
||||
std::string(err.what()) + " [" + err.getPackId() + "]"
|
||||
);
|
||||
}
|
||||
|
||||
lua::createtable(L, ids.size(), 0);
|
||||
for (size_t i = 0; i < ids.size(); i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue