mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-16 09:55:22 +02: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:
@@ -6069,6 +6069,10 @@ It can be created via `Settings(filename)`.
|
||||
* `default` is the value returned if `key` is not found.
|
||||
* Returns `nil` if `key` is not found and `default` not specified.
|
||||
* `get_np_group(key)`: returns a NoiseParams table
|
||||
* `get_flags(key)`:
|
||||
* Returns `{flag = true/false, ...}` according to the set flags.
|
||||
* Is currently limited to mapgen flags `mg_flags` and mapgen-specific
|
||||
flags like `mgv5_spflags`.
|
||||
* `set(key, value)`
|
||||
* Setting names can't contain whitespace or any of `="{}#`.
|
||||
* Setting values can't contain the sequence `\n"""`.
|
||||
|
Reference in New Issue
Block a user