mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
add advanced lua errors handler & fix hud script source path in traceback
This commit is contained in:
parent
2412699b89
commit
66be215101
5 changed files with 35 additions and 7 deletions
|
|
@ -83,7 +83,12 @@ void LevelScreen::initializePack(ContentPackRuntime* pack) {
|
|||
const ContentPack& info = pack->getInfo();
|
||||
fs::path scriptFile = info.folder/fs::path("scripts/hud.lua");
|
||||
if (fs::is_regular_file(scriptFile)) {
|
||||
scripting::load_hud_script(pack->getEnvironment(), info.id, scriptFile);
|
||||
scripting::load_hud_script(
|
||||
pack->getEnvironment(),
|
||||
info.id,
|
||||
scriptFile,
|
||||
pack->getId() + ":scripts/hud.lua"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue