diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-02-28 20:41:26 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-02-28 20:41:26 +0200 |
commit | b7fd3c86693bcb53f66c6b4b2d83248c534aa17b (patch) | |
tree | 86e6b67c9398badf6483bd20836741133cdb87c1 /data/mods | |
parent | b3f4cbe15751dfbe6066211a809a56741a18627a (diff) | |
download | minetest-b7fd3c86693bcb53f66c6b4b2d83248c534aa17b.tar.gz minetest-b7fd3c86693bcb53f66c6b4b2d83248c534aa17b.tar.bz2 minetest-b7fd3c86693bcb53f66c6b4b2d83248c534aa17b.zip |
Add minetest.get_worldpath() for getting location for custom data
Diffstat (limited to 'data/mods')
-rw-r--r-- | data/mods/default/init.lua | 3 | ||||
-rw-r--r-- | data/mods/experimental/init.lua | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index d07337379..3f4a8175e 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -118,6 +118,9 @@ -- {type="node", pos={x=, y=, z=}} -- minetest.get_current_modname() -> string -- minetest.get_modpath(modname) -> eg. "/home/user/.minetest/usermods/modname" +-- ^ Useful for loading additional .lua modules or static data from mod +-- minetest.get_worldpath(modname) -> eg. "/home/user/.minetest/world" +-- ^ Useful for storing custom data -- -- minetest.debug(line) -- ^ Goes to dstream diff --git a/data/mods/experimental/init.lua b/data/mods/experimental/init.lua index 9a8f8868d..ddc89f92c 100644 --- a/data/mods/experimental/init.lua +++ b/data/mods/experimental/init.lua @@ -540,5 +540,6 @@ minetest.register_abm({ print("experimental modname="..dump(minetest.get_current_modname())) print("experimental modpath="..dump(minetest.get_modpath("experimental"))) +print("experimental worldpath="..dump(minetest.get_worldpath())) -- END |