diff options
author | rubenwardy <rubenwardy@gmail.com> | 2015-02-12 16:57:22 +0000 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2015-02-16 10:24:19 +0100 |
commit | efa977518a60c47f3c409449be202298900372e8 (patch) | |
tree | 59d9cd81efa42eb4b60570d8f243e995e3a9f644 /doc | |
parent | 8aebc31a173fa3e6b80f25219b23131d9974a160 (diff) | |
download | minetest-efa977518a60c47f3c409449be202298900372e8.tar.gz minetest-efa977518a60c47f3c409449be202298900372e8.tar.bz2 minetest-efa977518a60c47f3c409449be202298900372e8.zip |
Fix minetest.item_eat's replace_with_item, fixes #2292
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 586c520fc..ba4eae35c 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -593,7 +593,7 @@ set to level from `param2`. Meshes ------ If drawtype `mesh` is used, tiles should hold model materials textures. -Only static meshes are implemented. +Only static meshes are implemented. For supported model formats see Irrlicht engine documentation. @@ -688,7 +688,7 @@ The relative height of the sheet can be controlled by the same perlin noise as w a non-zero `scale` parameter in `noise_params`. **IMPORTANT**: The noise is not transformed by `offset` or `scale` when comparing against the noise -threshold, but scale is used to determine relative height. +threshold, but scale is used to determine relative height. The height of the blob is randomly scattered, with a maximum height of `clust_size`. `clust_scarcity` and `clust_num_ores` are ignored. @@ -696,7 +696,7 @@ The height of the blob is randomly scattered, with a maximum height of `clust_si This is essentially an improved version of the so-called "stratus" ore seen in some unofficial mods. ### `blob` -Creates a deformed sphere of ore according to 3d perlin noise described by +Creates a deformed sphere of ore according to 3d perlin noise described by `noise_params`. The maximum size of the blob is `clust_size`, and `clust_scarcity` has the same meaning as with the `scatter` type. ### `vein @@ -1185,7 +1185,7 @@ Damage calculation: Client predicts damage based on damage groups. Because of this, it is able to give an immediate response when an entity is damaged or dies; the response is pre-defined somehow (e.g. by defining a sprite animation) (not implemented; -TODO). +TODO). Currently a smoke puff will appear when an entity dies. The group `immortal` completely disables normal damage. @@ -1926,6 +1926,8 @@ and `minetest.auth_reload` call the authetification handler. * `minetest.create_detached_inventory(name, callbacks)`: returns an `InvRef` * callbacks: See "Detached inventory callbacks" * Creates a detached inventory. If it already exists, it is cleared. +* `minetest.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed_thing)`: returns left over ItemStack + * See `minetest.item_eat` and `minetest.register_on_item_eat` ### Formspec * `minetest.show_formspec(playername, formname, formspec)` @@ -2037,7 +2039,11 @@ These functions return the leftover itemstack. * `minetest.item_drop(itemstack, dropper, pos)` * Drop the item * `minetest.item_eat(hp_change, replace_with_item)` - * Eat the item. `replace_with_item` can be `nil`. + * Eat the item. + * `replace_with_item` is the itemstring which is added to the inventory. + If the player is eating a stack, then replace_with_item goes to a + different spot. Can be `nil` + * See `minetest.do_item_eat` ### Defaults for the `on_punch` and `on_dig` node definition callbacks * `minetest.node_punch(pos, node, puncher, pointed_thing)` @@ -2244,7 +2250,7 @@ Class reference --------------- ### `NodeMetaRef` -Node metadata: reference extra data and functionality stored in a node. +Node metadata: reference extra data and functionality stored in a node. Can be gotten via `minetest.get_meta(pos)`. #### Methods @@ -2260,7 +2266,7 @@ Can be gotten via `minetest.get_meta(pos)`. * See "Node Metadata" ### `NoteTimerRef` -Node Timers: a high resolution persistent per-node timer. +Node Timers: a high resolution persistent per-node timer. Can be gotten via `minetest.get_node_timer(pos)`. #### Methods @@ -2485,7 +2491,7 @@ It can be created via `PseudoRandom(seed)`. ### `PerlinNoise` A perlin noise generator. It can be created via `PerlinNoise(seed, octaves, persistence, scale)` -or `PerlinNoise(noiseparams)`. +or `PerlinNoise(noiseparams)`. Alternatively with `minetest.get_perlin(seeddiff, octaves, persistence, scale)` or `minetest.get_perlin(noiseparams)`. |