collect generator voxel fragments to directory

This commit is contained in:
MihailRis
2024-09-26 01:30:55 +03:00
parent 788ad1f6a6
commit d839da7dab
8 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -180,12 +180,14 @@ static int l_get_default_generator(lua::State* L) {
/// @brief Get a list of all world generators
/// @return A table with the IDs of all world generators
static int l_get_generators(lua::State* L) {
if (content == nullptr) {
throw std::runtime_error("content is not initialized");
}
const auto& generators = content->generators.getDefs();
lua::createtable(L, generators.size(), 0);
int i = 0;
for (auto& [name, _] : generators) {
std::cout << name << std::endl;
lua::pushstring(L, name);
lua::rawseti(L, i + 1);
i++;