From: Novatux Date: Sun, 12 Jan 2014 12:53:10 +0000 (+0100) Subject: Fix doc and forceloading crash. X-Git-Tag: 0.4.10~322 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=676f34a02be17d898ea45b1b05be72bfcfcd588e;p=oweals%2Fminetest.git Fix doc and forceloading crash. --- diff --git a/builtin/forceloading.lua b/builtin/forceloading.lua index 021de075b..84895792b 100644 --- a/builtin/forceloading.lua +++ b/builtin/forceloading.lua @@ -22,7 +22,7 @@ function minetest.forceload_block(pos) blocks_forceloaded[hash] = blocks_forceloaded[hash] + 1 return true else - if total_forceloaded >= (minetest.setting_get("max_forceloaded_blocks") or 16) then + if total_forceloaded >= (tonumber(minetest.setting_get("max_forceloaded_blocks")) or 16) then return false end total_forceloaded = total_forceloaded+1 diff --git a/doc/lua_api.txt b/doc/lua_api.txt index afb142513..47232ae16 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1517,6 +1517,8 @@ Random: minetest.get_connected_players() -> list of ObjectRefs minetest.hash_node_position({x=,y=,z=}) -> 48-bit integer ^ Gives a unique hash number for a node position (16+16+16=48bit) +minetest.get_position_from_hash(hash) -> postion +^ Inverse transform of minetest.hash_node_postion minetest.get_item_group(name, group) -> rating ^ Get rating of a group of an item. (0 = not in group) minetest.get_node_group(name, group) -> rating