mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
fix: missing pack.has_indices if content is not loaded
This commit is contained in:
parent
aca9b49c77
commit
b02b454573
3 changed files with 40 additions and 11 deletions
|
|
@ -123,8 +123,13 @@ static int l_pack_get_info(
|
|||
auto runtime = content ? content->getPackRuntime(pack.id) : nullptr;
|
||||
if (runtime) {
|
||||
lua::pushboolean(L, runtime->getStats().hasSavingContent());
|
||||
lua::setfield(L, "has_indices");
|
||||
} else {
|
||||
auto stats = pack.loadStats();
|
||||
lua::pushboolean(
|
||||
L, stats.has_value() ? stats->hasSavingContent() : false
|
||||
);
|
||||
}
|
||||
lua::setfield(L, "has_indices");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue