diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-09-09 22:50:25 +0200 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-09-10 18:31:38 +0200 |
commit | d820a6bfd807b6d181a858f3ea8a0d0f5c2b1879 (patch) | |
tree | 23b6052c527213c854289b1a5ea742897a130fd4 /doc/lua_api.txt | |
parent | 10a38a3005e420ec16a821117bf9f025b6e2c61b (diff) | |
download | minetest-d820a6bfd807b6d181a858f3ea8a0d0f5c2b1879.tar.gz minetest-d820a6bfd807b6d181a858f3ea8a0d0f5c2b1879.tar.bz2 minetest-d820a6bfd807b6d181a858f3ea8a0d0f5c2b1879.zip |
Add Settings interface for Lua
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index f593b0db8..ebd70ea6e 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1069,6 +1069,8 @@ minetest.pos_to_string({x=X,y=Y,z=Z}) -> "(X,Y,Z)" minetest.string_to_pos(string) -> position ^ Same but in reverse ^ escapes characters [ ] \ , ; that can not be used in formspecs +minetest.is_yes(string) +^ returns whether string can be interpreted as yes minetest namespace reference ----------------------------- @@ -1737,6 +1739,18 @@ methods: ^ from (minx,miny,minz) to (maxx,maxy,maxz) in the order of [z [y [x]]] - iterp(minp, maxp): same as above, except takes a vector +Settings: An interface to read config files in the format of minetest.conf +- Can be created via Settings(filename) +methods: +- get(key) -> value +- get_bool(key) -> boolean +- set(key, value) +- remove(key) -> success +- get_names() -> {key1,...} +- write() -> success + ^ write changes to file +- to_table() -> {[key1]=value1,...} + Mapgen objects --------------- A mapgen object is a construct used in map generation. Mapgen objects can be used by an on_generate |