aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-05-06 22:31:35 -0400
committerAuke Kok <sofar+github@foo-projects.org>2016-10-31 21:53:00 -0700
commit7607b0ac2065a50a9b68b22909ab40738f2d08e8 (patch)
tree5c806ccbe408463890342599b675b492d63c5162 /doc/lua_api.txt
parent70e2df4f86cf4101a10c7e1f7a6ac5cc03992793 (diff)
downloadminetest-7607b0ac2065a50a9b68b22909ab40738f2d08e8.tar.gz
minetest-7607b0ac2065a50a9b68b22909ab40738f2d08e8.tar.bz2
minetest-7607b0ac2065a50a9b68b22909ab40738f2d08e8.zip
Add version API
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index da90f93d2..497864fac 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1908,6 +1908,17 @@ Helper functions
* nil: return all entries,
* true: return only subdirectory names, or
* false: return only file names.
+* `minetest.get_version()`: returns a table containing components of the
+ engine version. Components:
+ * `project`: Name of the project, eg, "Minetest"
+ * `string`: Simple version, eg, "1.2.3-dev"
+ * `hash`: Full git version (only set if available), eg, "1.2.3-dev-01234567-dirty"
+ Use this for informational purposes only. The information in the returned
+ table does not represent the capabilities of the engine, nor is it
+ reliable or verifyable. Compatible forks will have a different name and
+ version entirely. To check for the presence of engine features, test
+ whether the functions exported by the wanted features exist. For example:
+ `if core.nodeupdate then ... end`.
### Logging
* `minetest.debug(...)`