summaryrefslogtreecommitdiff
path: root/src/scriptapi.cpp
diff options
context:
space:
mode:
authorWeblate <42@minetest.ru>2013-02-28 18:04:07 +0100
committerWeblate <42@minetest.ru>2013-02-28 18:04:07 +0100
commit066b0314b14b1c59e7d6c0d35345562e6a0c644c (patch)
treec2ec865f713198715ada98d8dc13b29efc4915a4 /src/scriptapi.cpp
parent22e186b4aa88b585e71500c4e9a03bf69b0b6191 (diff)
parent7caa28a6aa50aef43d9231662ad845a4aea27e88 (diff)
downloadminetest-066b0314b14b1c59e7d6c0d35345562e6a0c644c.tar.gz
minetest-066b0314b14b1c59e7d6c0d35345562e6a0c644c.tar.bz2
minetest-066b0314b14b1c59e7d6c0d35345562e6a0c644c.zip
Merge remote branch 'origin/master'
Diffstat (limited to 'src/scriptapi.cpp')
-rw-r--r--src/scriptapi.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index 7fddcfc68..7aa148fd6 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -1063,10 +1063,6 @@ static ItemDefinition read_item_definition(lua_State *L, int index,
def.usable = lua_isfunction(L, -1);
lua_pop(L, 1);
- lua_getfield(L, index, "on_rightclick");
- def.rightclickable = lua_isfunction(L, -1);
- lua_pop(L, 1);
-
getboolfield(L, index, "liquids_pointable", def.liquids_pointable);
warn_if_field_exists(L, index, "tool_digging_properties",
@@ -1164,6 +1160,10 @@ static ContentFeatures read_content_features(lua_State *L, int index)
if(!lua_isnil(L, -1)) f.has_after_destruct = true;
lua_pop(L, 1);
+ lua_getfield(L, index, "on_rightclick");
+ f.rightclickable = lua_isfunction(L, -1);
+ lua_pop(L, 1);
+
/* Name */
getstringfield(L, index, "name", f.name);
@@ -4751,7 +4751,7 @@ static int l_register_item_raw(lua_State *L)
// Default to having client-side placement prediction for nodes
// ("" in item definition sets it off)
if(def.node_placement_prediction == "__default"){
- if(def.type == ITEM_NODE && !def.rightclickable)
+ if(def.type == ITEM_NODE)
def.node_placement_prediction = name;
else
def.node_placement_prediction = "";