mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add generator 'caption' property
This commit is contained in:
parent
7c56d8fd7f
commit
de00414456
11 changed files with 59 additions and 21 deletions
|
|
@ -52,10 +52,10 @@ static int l_get_generators(lua::State* L) {
|
|||
|
||||
int i = 1;
|
||||
for (const auto& pack : packs) {
|
||||
auto names = ContentLoader::scanContent(pack, ContentType::GENERATOR);
|
||||
for (const auto& name : names) {
|
||||
lua::pushstring(L, name);
|
||||
lua::rawseti(L, i);
|
||||
auto pairs = ContentLoader::scanContent(pack, ContentType::GENERATOR);
|
||||
for (const auto& [name, caption] : pairs) {
|
||||
lua::pushstring(L, caption);
|
||||
lua::setfield(L, name);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue