aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorproller <proller@github.com>2013-07-27 22:34:30 +0400
committerproller <proller@github.com>2013-07-27 23:21:48 +0400
commit3aedfac9685c2d9ae8bac5a5b7e72e527f22c08d (patch)
treed1f9067040acb0b5dad42a2ae8935b91124a36d3 /doc
parente65d8ad6553d7ae0acf63b43e9818059088a00b6 (diff)
downloadminetest-3aedfac9685c2d9ae8bac5a5b7e72e527f22c08d.tar.gz
minetest-3aedfac9685c2d9ae8bac5a5b7e72e527f22c08d.tar.bz2
minetest-3aedfac9685c2d9ae8bac5a5b7e72e527f22c08d.zip
Weather support
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 9973a790b..cf1ab7f05 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -322,6 +322,8 @@ param2 is reserved for the engine when any of these are used:
facedir modulo 4 = axisdir
0 = y+ 1 = z+ 2 = z- 3 = x+ 4 = x- 5 = y-
facedir's two less significant bits are rotation around the axis
+ paramtype2 == "leveled"
+ ^ The drawn node level is read from param2, like flowingliquid
Nodes can also contain extra data. See "Node Metadata".
@@ -353,7 +355,7 @@ 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.
+"fixed" and "leveled" box type is supported for these.
^ Please note that this is still experimental, and may be incompatibly
changed in the future.
@@ -381,6 +383,8 @@ A box is defined as:
A box of a regular node would look like:
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
+type = "leveled" is same as "fixed", but y2 will be automaticaly setted to level from param2
+
Ore types
---------------
These tell in what manner the ore is generated.
@@ -1258,6 +1262,18 @@ minetest.find_path(pos1,pos2,searchdistance,max_jump,max_drop,algorithm)
^ algorithm: A*_noprefetch(default), A*, Dijkstra
minetest.spawn_tree (pos, {treedef})
^ spawns L-System tree at given pos with definition in treedef table
+minetest.transforming_liquid_add(pos)
+^ add node to liquid update queue
+minetest.get_node_max_level(pos)
+^ get max available level for leveled node
+minetest.get_node_level(pos)
+^ get level of leveled node (water, snow)
+minetest.add_node_level(pos, level)
+^ increase level of leveled node by level, default level = 1, if totallevel > maxlevel returns rest (total-max). can be negative for decreasing
+minetest.get_heat(pos)
+^ heat at pos
+minetest.get_humidity(pos)
+^ humidity at pos
Inventory:
minetest.get_inventory(location) -> InvRef
@@ -1965,6 +1981,8 @@ Node definition (register_node)
liquid_alternative_source = "", -- Source version of flowing liquid
liquid_viscosity = 0, -- Higher viscosity = slower flow (max. 7)
liquid_renewable = true, -- Can new liquid source be created by placing
+ freezemelt = "", -- water for snow/ice, ice/snow for water
+ leveled = 0, -- Block contain level in param2. value - default level, used for snow. Dont forget use "leveled" type nodebox
liquid_range = 8, -- number of flowing nodes arround source (max. 8)
drowning = true, -- Player will drown in these
two or more sources nearly?