aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-12-12 14:00:10 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-12-12 14:00:10 +0100
commit7250cf2c1c29b685b8ac3552c296f11c8178b0a0 (patch)
tree8a36316aaa95e5355f35229f816b52db0fd7eac0 /doc/lua_api.txt
parentf783f59392f5e86c5645195521b2fa008ffe4fe7 (diff)
parentaf073438fd70833955a30bcbe1c22e6f344ec41c (diff)
downloaddragonfireclient-7250cf2c1c29b685b8ac3552c296f11c8178b0a0.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt24
1 files changed, 21 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index adaaf6180..2bb739bc8 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1014,7 +1014,9 @@ The function of `param2` is determined by `paramtype2` in node definition.
* `paramtype2 = "flowingliquid"`
* Used by `drawtype = "flowingliquid"` and `liquidtype = "flowing"`
* The liquid level and a flag of the liquid are stored in `param2`
- * Bits 0-2: Liquid level (0-7). The higher, the more liquid is in this node
+ * Bits 0-2: Liquid level (0-7). The higher, the more liquid is in this node;
+ see `minetest.get_node_level`, `minetest.set_node_level` and `minetest.add_node_level`
+ to access/manipulate the content of this field
* Bit 3: If set, liquid is flowing downwards (no graphical effect)
* `paramtype2 = "wallmounted"`
* Supported drawtypes: "torchlike", "signlike", "normal", "nodebox", "mesh"
@@ -1245,6 +1247,9 @@ A box of a regular node would look like:
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
+To avoid collision issues, keep each value within the range of +/- 1.45.
+This also applies to leveled nodeboxes, where the final height shall not
+exceed this soft limit.
@@ -3234,6 +3239,7 @@ Helper functions
* returns true when the passed number represents NaN.
* `minetest.get_us_time()`
* returns time with microsecond precision. May not return wall time.
+ * This value might overflow on certain 32-bit systems!
* `table.copy(table)`: returns a table
* returns a deep copy of `table`
* `table.indexof(list, val)`: returns the smallest numerical index containing
@@ -6425,6 +6431,8 @@ object you are working with still exists.
* `selected_mode` is the mode index to be selected after modes have been changed
(0 is the first mode).
* `set_sky(sky_parameters)`
+ * The presence of the function `set_sun`, `set_moon` or `set_stars` indicates
+ whether `set_sky` accepts this format. Check the legacy format otherwise.
* `sky_parameters` is a table with the following optional fields:
* `base_color`: ColorSpec, changes fog in "skybox" and "plain".
* `type`: Available types:
@@ -6466,6 +6474,15 @@ object you are working with still exists.
abides by, `"custom"` uses `sun_tint` and `moon_tint`, while
`"default"` uses the classic Minetest sun and moon tinting.
Will use tonemaps, if set to `"default"`. (default: `"default"`)
+* `set_sky(base_color, type, {texture names}, clouds)`
+ * Deprecated. Use `set_sky(sky_parameters)`
+ * `base_color`: ColorSpec, defaults to white
+ * `type`: Available types:
+ * `"regular"`: Uses 0 textures, `bgcolor` ignored
+ * `"skybox"`: Uses 6 textures, `bgcolor` used
+ * `"plain"`: Uses 0 textures, `bgcolor` used
+ * `clouds`: Boolean for whether clouds appear in front of `"skybox"` or
+ `"plain"` custom skyboxes (default: `true`)
* `get_sky()`: returns base_color, type, table of textures, clouds.
* `get_sky_color()`: returns a table with the `sky_color` parameters as in
`set_sky`.
@@ -7346,6 +7363,7 @@ Used by `minetest.register_node`.
leveled_max = 127,
-- Maximum value for `leveled` (0-127), enforced in
-- `minetest.set_node_level` and `minetest.add_node_level`.
+ -- Values above 124 might causes collision detection issues.
liquid_range = 8, -- Number of flowing nodes around source (max. 8)
@@ -7373,6 +7391,7 @@ Used by `minetest.register_node`.
type = "fixed",
fixed = {
{-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16},
+ -- Node box format: see [Node boxes]
},
},
-- Custom selection box definition. Multiple boxes can be defined.
@@ -7383,13 +7402,12 @@ Used by `minetest.register_node`.
type = "fixed",
fixed = {
{-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16},
+ -- Node box format: see [Node boxes]
},
},
-- Custom collision box definition. Multiple boxes can be defined.
-- If "nodebox" drawtype is used and collision_box is nil, then node_box
-- definition is used for the collision box.
- -- Both of the boxes above are defined as:
- -- {xmin, ymin, zmin, xmax, ymax, zmax} in nodes from node center.
-- Support maps made in and before January 2012
legacy_facedir_simple = false,