summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2017-02-10 06:59:38 +0000
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-02-10 07:59:38 +0100
commit74b670a7930736fb4f43dcb5c9e0a366bf23cad4 (patch)
treedcb022040a9f14194541121b31af49baae451897 /doc
parent5707b739f38cc5cf651de5b69d91d4f46511dac0 (diff)
downloadminetest-74b670a7930736fb4f43dcb5c9e0a366bf23cad4.tar.gz
minetest-74b670a7930736fb4f43dcb5c9e0a366bf23cad4.tar.bz2
minetest-74b670a7930736fb4f43dcb5c9e0a366bf23cad4.zip
Correct lua_api.txt docs related to meta (#5198)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt19
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 4774e8a5a..0245ee7bd 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2815,7 +2815,7 @@ See `StorageRef`, `NodeMetaRef` and `ItemStackMetaRef`.
### `NodeMetaRef`
Node metadata: reference extra data and functionality stored in a node.
-Can be gotten via `minetest.get_meta(pos)`.
+Can be obtained via `minetest.get_meta(pos)`.
#### Methods
* All methods in MetaDataRef
@@ -2823,7 +2823,14 @@ Can be gotten via `minetest.get_meta(pos)`.
### `ItemStackMetaRef`
ItemStack metadata: reference extra data and functionality stored in a stack.
-Can be gotten via `item:get_meta()`.
+Can be obtained via `item:get_meta()`.
+
+#### Methods
+* All methods in MetaDataRef
+
+### `StorageRef`
+Mod metadata: per mod metadata, saved automatically.
+Can be obtained via `minetest.get_mod_storage()` during load time.
#### Methods
* All methods in MetaDataRef
@@ -2850,9 +2857,6 @@ Can be gotten via `minetest.get_node_timer(pos)`.
* `is_started()`: returns boolean state of timer
* returns `true` if timer is started, otherwise `false`
-### `StorageRef`
-This is basically a reference to a C++ `ModMetadata`
-
### `ObjectRef`
Moving things in the game are generally these.
@@ -3100,8 +3104,9 @@ an itemstring, a table or `nil`.
* `set_count(count)`: Returns boolean whether item was cleared
* `get_wear()`: Returns tool wear (`0`-`65535`), `0` for non-tools.
* `set_wear(wear)`: Returns boolean whether item was cleared
-* `get_metadata()`: Returns metadata (a string attached to an item stack).
-* `set_metadata(metadata)`: Returns true.
+* `get_meta()`: Returns ItemStackMetaRef. See section for more details
+* `get_metadata()`: (DEPRECATED) Returns metadata (a string attached to an item stack).
+* `set_metadata(metadata)`: (DEPRECATED) Returns true.
* `clear()`: removes all items from the stack, making it empty.
* `replace(item)`: replace the contents of this stack.
* `item` can also be an itemstring or table.