diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-26 03:37:09 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:53 +0200 |
commit | 234bf99743f65d4005673defd65aa3e96ddb853f (patch) | |
tree | 55496c5de0c18f91970e2ca7385b9767b1c0dc66 /data/mods | |
parent | f93144fee7093d19eb7f99bbb5068ab2e704c8ed (diff) | |
download | minetest-234bf99743f65d4005673defd65aa3e96ddb853f.tar.gz minetest-234bf99743f65d4005673defd65aa3e96ddb853f.tar.bz2 minetest-234bf99743f65d4005673defd65aa3e96ddb853f.zip |
Lua setting getter
Diffstat (limited to 'data/mods')
-rw-r--r-- | data/mods/default/init.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index 6512f55eb..c6f039385 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -18,6 +18,8 @@ -- minetest.register_on_newplayer(func(ObjectRef)) -- minetest.register_on_respawnplayer(func(ObjectRef)) -- ^ return true in func to disable regular player placement +-- minetest.setting_get(name) +-- minetest.setting_getbool(name) -- -- Global objects: -- minetest.env - environment reference @@ -1313,6 +1315,9 @@ minetest.register_on_respawnplayer(function(player) -- return true end) +-- Example setting get +print("max_users = " .. dump(minetest.setting_get("max_users"))) + -- -- Done, print some random stuff -- |