aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-05-07 12:13:15 +0200
committerGitHub <noreply@github.com>2017-05-07 12:13:15 +0200
commitc1b3ed4180dea16e2fa77663a7d2bf155595dd60 (patch)
tree2cb74486cb3a493716be611ca4cf44d666dec3bf /doc
parent0d7c37943bf29b2c4956576c15efa796d5b5f2d4 (diff)
downloadminetest-c1b3ed4180dea16e2fa77663a7d2bf155595dd60.tar.gz
minetest-c1b3ed4180dea16e2fa77663a7d2bf155595dd60.tar.bz2
minetest-c1b3ed4180dea16e2fa77663a7d2bf155595dd60.zip
Player attrs: permits to remove an attribute by setting value to nil (#5716)
* Player attrs: permits to remove an attribute by setting value to nil When doing player:set_attribute("attr", nil) remove attribute Also remove a useless check on C++ API part (already done by checkplayer) Fix #5709
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 607a13fdd..d8e297f4c 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3028,7 +3028,9 @@ This is basically a reference to a C++ `ServerActiveObject`
* `0`: player is drowning,
* `1`-`10`: remaining number of bubbles
* `11`: bubbles bar is not shown
-* `set_attribute(attribute, value)`: sets an extra attribute with value on player
+* `set_attribute(attribute, value)`:
+ * Sets an extra attribute with value on player.
+ * If value is nil, remove attribute from player.
* `get_attribute(attribute)`: returns value for extra attribute. Returns nil if no attribute found.
* `set_inventory_formspec(formspec)`
* Redefine player's inventory form