From b1f2a693820537c6ecd47b84056da136e2f9f563 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 8 Nov 2019 20:18:41 +0100 Subject: Introduce get_modpath() for CSM --- doc/client_lua_api.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/client_lua_api.txt') diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index d355376f5..ab7963029 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -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: -- cgit v1.2.3