aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-07-16 04:57:44 +0100
committerGitHub <noreply@github.com>2018-07-16 04:57:44 +0100
commit1aaee5b30d2c28e3256a0c8c3fc3784af91fb21b (patch)
tree056ee1acd614114605d1375a17dc1647f59cc847 /doc
parentca8ec46843da054e656d2f63b23d0b1695c023da (diff)
downloadhax-minetest-server-1aaee5b30d2c28e3256a0c8c3fc3784af91fb21b.tar.gz
hax-minetest-server-1aaee5b30d2c28e3256a0c8c3fc3784af91fb21b.zip
Lua_api.txt: Various minor improvements (#7560)
Add missing section title for 'Node paramtypes'. Clarify documentation for schematic Y-slice table. Document that schematic Y-slice behaviour does not invert for ceiling schematic decorations.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt21
1 files changed, 13 insertions, 8 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 5e26921eb..2f8255cb4 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -929,6 +929,8 @@ They are represented by a table:
them for certain automated functions. If you don't use these functions, you can
use them to store arbitrary values.
+Node paramtypes
+---------------
The functions of `param1` and `param2` are determined by certain fields in the
node definition:
@@ -2757,12 +2759,14 @@ Minetest Schematic file (`.mts`) or through raw data supplied through Lua,
in the form of a table. This table specifies the following fields:
* The `size` field is a 3D vector containing the dimensions of the provided
- schematic. (required)
-* The `yslice_prob` field is a table of {ypos, prob} which sets the `ypos`th
- vertical slice of the schematic to have a `prob / 256 * 100` chance of
- occurring. (default: 255)
+ schematic. (required field)
+* The `yslice_prob` field is a table of {ypos, prob} slice tables. A slice table
+ sets the probability of a particular horizontal slice of the schematic being
+ placed. (optional field)
+ `ypos` = 0 for the lowest horizontal slice of a schematic.
+ The default of `prob` is 255.
* The `data` field is a flat table of MapNode tables making up the schematic,
- in the order of `[z [y [x]]]`. (required)
+ in the order of `[z [y [x]]]`. (required field)
Each MapNode table contains:
* `name`: the name of the map node to place (required)
* `prob` (alias `param1`): the probability of this node being placed
@@ -6064,12 +6068,13 @@ Decoration definition (`register_decoration`)
-- ^ by the decoration.
-- ^ "all_floors", "all_ceilings": Instead of placement on the highest
-- ^ surface in a mapchunk the decoration is placed on all floor and/or
- -- ^ ceiling surfaces, for example in caves.
+ -- ^ ceiling surfaces, for example in caves and dungeons.
-- ^ Ceiling decorations act as an inversion of floor decorations so the
-- ^ effect of 'place_offset_y' is inverted.
+ -- ^ Y-slice probabilities do not function correctly for ceiling
+ -- ^ schematic decorations as the behaviour is unchanged.
-- ^ If a single decoration registration has both flags the floor and
- -- ^ ceiling decorations will be aligned vertically and may sometimes
- -- ^ meet to form a column.
+ -- ^ ceiling decorations will be aligned vertically.
----- Simple-type parameters
decoration = "default:grass",