aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-04-04 06:41:37 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-04-04 07:41:37 +0200
commit000ec260017256016b62bb9936bbda1ff969e252 (patch)
tree9eebd6b3f1be915fe1195e241a8a754f1bb44259 /doc
parent859141a0ce38fbd606d95ae7a2f0999acf2fbe84 (diff)
downloadminetest-000ec260017256016b62bb9936bbda1ff969e252.tar.gz
minetest-000ec260017256016b62bb9936bbda1ff969e252.tar.bz2
minetest-000ec260017256016b62bb9936bbda1ff969e252.zip
[CSM] Add local node meta reference. (#5508)
Diffstat (limited to 'doc')
-rw-r--r--doc/client_lua_api.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md
index c9ccbeefa..68156efd3 100644
--- a/doc/client_lua_api.md
+++ b/doc/client_lua_api.md
@@ -690,6 +690,8 @@ Call these functions only at load time!
for unloaded areas.
* `minetest.get_node_or_nil(pos)`
* Same as `get_node` but returns `nil` for unloaded areas.
+* `minetest.get_meta(pos)`
+ * Get a `NodeMetaRef` at that position
### Player
* `minetest.get_wielded_item()`
@@ -794,7 +796,18 @@ It can be created via `Settings(filename)`.
* write changes to file
* `to_table()`: returns `{[key1]=value1,...}`
-Definition tables
+### NodeMetaRef
+Node metadata: reference extra data and functionality stored in a node.
+Can be obtained via `minetest.get_meta(pos)`.
+
+#### Methods
+* `get_string(name)`
+* `get_int(name)`
+* `get_float(name)`
+* `to_table()`: returns `nil` or a table with keys:
+ * `fields`: key-value storage
+ * `inventory`: `{list1 = {}, ...}}`
+
-----------------
### Chat command definition (`register_chatcommand`)