]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - doc/client_lua_api.txt
Introduce get_modpath() for CSM
[dragonfireclient.git] / doc / client_lua_api.txt
index d355376f594a446f4d932e4d1e07d0282fed6683..ab7963029a2c6fb005f3dbf8de8987fefaa125fd 100644 (file)
@@ -631,6 +631,10 @@ Minetest namespace reference
 ### Utilities
 
 * `minetest.get_current_modname()`: returns the currently loading mod's name, when we are loading a mod
+* `minetest.get_modpath(modname)`: returns virtual path of given mod including
+   the trailing separator. This is useful to load additional Lua files
+   contained in your mod:
+   e.g. `dofile(minetest.get_modpath(minetest.get_current_modname()) .. "stuff.lua")`
 * `minetest.get_language()`: returns the currently set gettext language.
 * `minetest.get_version()`: returns a table containing components of the
    engine version.  Components: