aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-06-17 17:23:58 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-06-17 17:23:58 +0300
commit22ae83a589747526b538b9f5e6b019cc8b2c1fdf (patch)
treed1b1931bc9cf593ff4d2204e41f61a2918de73bc
parent1575448b1a71dd029a8d135d2aff9096483a9953 (diff)
downloadminetest-22ae83a589747526b538b9f5e6b019cc8b2c1fdf.tar.gz
minetest-22ae83a589747526b538b9f5e6b019cc8b2c1fdf.tar.bz2
minetest-22ae83a589747526b538b9f5e6b019cc8b2c1fdf.zip
Explain node boxes in lua_api.txt
-rw-r--r--doc/lua_api.txt38
1 files changed, 37 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 28042fa81..39267e34e 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -299,6 +299,41 @@ Look for examples in games/minimal or games/minetest_game.
- plantlike
- fencelike
- raillike
+- nodebox -- See below. EXPERIMENTAL
+
+Node boxes
+-----------
+Node selection boxes are defined using "node boxes"
+
+The "nodebox" node drawtype allows defining visual of nodes consisting of
+arbitrary number of boxes. It allows defining stuff like stairs. Only the
+"fixed" box type is supported for these.
+^ Please note that this is still experimental, and may be incompatibly
+ changed in the future.
+
+A nodebox is defined as any of:
+{
+ -- A normal cube; the default in most things
+ type = "regular"
+}
+{
+ -- A fixed box (facedir param2 is used, if applicable)
+ type = "fixed",
+ fixed = box OR {box1, box2, ...}
+}
+{
+ -- A box like the selection box for torches
+ -- (wallmounted param2 is used, if applicable)
+ type = "wallmounted",
+ wall_top = box,
+ wall_bottom = box,
+ wall_side = box
+}
+
+A box is defined as:
+ {x1, y1, z1, x2, y2, z2}
+A box of a regular node would look like:
+ {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
Representations of simple things
--------------------------------
@@ -1186,7 +1221,8 @@ Node definition (register_node)
liquid_viscosity = 0,
light_source = 0,
damage_per_second = 0,
- selection_box = {type="regular"},
+ node_box = {type="regular"}, -- See "Node boxes"
+ selection_box = {type="regular"}, -- See "Node boxes"
legacy_facedir_simple = false, -- Support maps made in and before January 2012
legacy_wallmounted = false, -- Support maps made in and before January 2012
sounds = {