1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-26 18:21:04 +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

@ -31,7 +31,6 @@ extern FlagDesc flagdesc_mapgen_v5[];
struct MapgenV5Params : public MapgenParams
{
u32 spflags = MGV5_CAVERNS;
float cave_width = 0.09f;
s16 large_cave_depth = -256;
u16 small_cave_num_min = 0;
@ -59,6 +58,7 @@ struct MapgenV5Params : public MapgenParams
void readParams(const Settings *settings);
void writeParams(Settings *settings) const;
void setDefaultSettings(Settings *settings);
};
class MapgenV5 : public MapgenBasic