1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) (#9284)

Unified flags handling in C++ and Lua Settings API
     -> Reading only, for now. Writing can be implemented later, if needed.
API function to read the currently active flags
     -> was impossible from Lua

Co-authored-by: Wuzzy <wuzzy2@mail.ru>
This commit is contained in:
SmallJoker 2020-01-25 16:56:54 +01:00 committed by GitHub
parent 9cb3219f34
commit cde2a7f6f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 222 additions and 39 deletions

View file

@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "config.h"
#include "constants.h"
#include "porting.h"
#include "mapgen/mapgen.h" // Mapgen::setDefaultSettings
#include "util/string.h"
void set_default_settings(Settings *settings)
@ -426,10 +427,10 @@ void set_default_settings(Settings *settings)
settings->setDefault("water_level", "1");
settings->setDefault("mapgen_limit", "31000");
settings->setDefault("chunksize", "5");
settings->setDefault("mg_flags", "caves,dungeons,light,decorations,biomes");
settings->setDefault("fixed_map_seed", "");
settings->setDefault("max_block_generate_distance", "8");
settings->setDefault("enable_mapgen_debug_info", "false");
Mapgen::setDefaultSettings(settings);
// Server list announcing
settings->setDefault("server_announce", "false");