summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-04-08 22:44:37 +0200
committerest31 <MTest31@outlook.com>2015-04-08 23:05:26 +0200
commit0a413265cb7057b5303733dd32cf802a9ecf6105 (patch)
tree21ade34f3b2ff49dd1fa7e0693d041d5cb59038e /doc
parentc758fd73ff0b95ca27f833f8aefd0345edd71fcc (diff)
downloadminetest-0a413265cb7057b5303733dd32cf802a9ecf6105.tar.gz
minetest-0a413265cb7057b5303733dd32cf802a9ecf6105.tar.bz2
minetest-0a413265cb7057b5303733dd32cf802a9ecf6105.zip
Document for api functions that rely on current_modname, that it doesn't work when not loading mods
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index eae7e537b..0aa3691d8 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -439,7 +439,8 @@ the global `minetest.registered_*` tables.
* added to `minetest.registered_schematic` with the key of `schematic.name`
* if `schematic.name` is nil, the key is the returned ID
* if the schematic is loaded from a file, schematic.name is set to the filename
- * the current mod path will be prepended to the schematic filename if it is a relative path
+ * if the function is called when loading the mod, and schematic.name is a relative path,
+ * then the current mod path will be prepended to the schematic filename
* `minetest.clear_registered_biomes()`
* clears all biomes currently registered
@@ -1667,7 +1668,7 @@ Helper functions
### Utilities
-* `minetest.get_current_modname()`: returns a string
+* `minetest.get_current_modname()`: returns the currently loading mod's name, when we are loading a mod
* `minetest.get_modpath(modname)`: returns e.g. `"/home/user/.minetest/usermods/modname"`
* Useful for loading additional `.lua` modules or static data from mod
* `minetest.get_modnames()`: returns a list of installed mods