summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorBen Deutsch <ben@bendeutsch.de>2017-03-17 10:39:47 +0100
committerparamat <mat.gregory@virginmedia.com>2017-04-30 00:06:13 +0100
commitf1d7a26b7c341b468f34325cec5c3d495f175a8f (patch)
tree9926a816208ec7b9384ba718be739953d9d3d773 /doc/lua_api.txt
parent95409da87d009c352f27c737621972c2225796c9 (diff)
downloadminetest-f1d7a26b7c341b468f34325cec5c3d495f175a8f.tar.gz
minetest-f1d7a26b7c341b468f34325cec5c3d495f175a8f.tar.bz2
minetest-f1d7a26b7c341b468f34325cec5c3d495f175a8f.zip
Add clouds API
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index eba8a5fef..479e38a2e 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -3077,6 +3077,15 @@ This is basically a reference to a C++ `ServerActiveObject`
* `"skybox"`: Uses 6 textures, `bgcolor` used
* `"plain"`: Uses 0 textures, `bgcolor` used
* `get_sky()`: returns bgcolor, type and a table with the textures
+* `set_clouds(parameters)`: set cloud parameters
+ * `parameters` is a table with the following optional fields:
+ * `density`: from `0` (no clouds) to `1` (full clouds) (default `0.4`)
+ * `color`: basic cloud color, with alpha channel (default `#fff0f0e5`)
+ * `ambient`: cloud color lower bound, use for a "glow at night" effect (default `#000000`)
+ * `height`: cloud height, i.e. y of cloud base (default per conf, usually `120`)
+ * `thickness`: cloud thickness in nodes (default `16`)
+ * `speed`: 2D cloud speed + direction in nodes per second (default `{x=0, y=-2}`)
+* `get_clouds()`: returns a table with the current cloud parameters as in `set_clouds`
* `override_day_night_ratio(ratio or nil)`
* `0`...`1`: Overrides day-night ratio, controlling sunlight to a specific amount
* `nil`: Disables override, defaulting to sunlight based on day-night cycle