1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Add version API

This commit is contained in:
ShadowNinja 2014-05-06 22:31:35 -04:00 committed by Auke Kok
parent 70e2df4f86
commit 7607b0ac20
6 changed files with 45 additions and 12 deletions

View file

@ -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(...)`