summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2020-01-25 16:56:54 +0100
committerGitHub <noreply@github.com>2020-01-25 16:56:54 +0100
commitcde2a7f6f24f638421238ead4e61b155322fefc8 (patch)
tree96b6b1dd00a0c14660eea6f3f518b5d832dc1bd8 /doc/lua_api.txt
parent9cb3219f34be983e1b84a62a64c25e137d587365 (diff)
downloadminetest-cde2a7f6f24f638421238ead4e61b155322fefc8.tar.gz
minetest-cde2a7f6f24f638421238ead4e61b155322fefc8.tar.bz2
minetest-cde2a7f6f24f638421238ead4e61b155322fefc8.zip
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>
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 551aa50b5..1857ce541 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -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"""`.