summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authoryou <ovvv@web.de>2018-05-20 14:51:50 +0200
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-05-20 14:51:50 +0200
commit22df02d25bb1ddb1de48e645c5256621ce9a9ed9 (patch)
treeb3a8fc33b177ec2af7538e6b4e444b9f7f0f6664 /src/script
parent6d6b894c7ad7fbd2dcfab25488738149dc0efb06 (diff)
downloadminetest-22df02d25bb1ddb1de48e645c5256621ce9a9ed9.tar.gz
minetest-22df02d25bb1ddb1de48e645c5256621ce9a9ed9.tar.bz2
minetest-22df02d25bb1ddb1de48e645c5256621ce9a9ed9.zip
Fix missing ignore textures (#7326)
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_item.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp
index d7e9f0a5b..46c1c98a0 100644
--- a/src/script/lua_api/l_item.cpp
+++ b/src/script/lua_api/l_item.cpp
@@ -536,11 +536,16 @@ int ModApiItemMod::l_register_item_raw(lua_State *L)
idef->registerItem(def);
// Read the node definition (content features) and register it
- if(def.type == ITEM_NODE){
+ if (def.type == ITEM_NODE) {
ContentFeatures f = read_content_features(L, table);
+ // when a mod reregisters ignore, only texture changes and such should
+ // be done
+ if (f.name == "ignore")
+ return 0;
+
content_t id = ndef->set(f.name, f);
- if(id > MAX_REGISTERED_CONTENT){
+ if (id > MAX_REGISTERED_CONTENT) {
throw LuaError("Number of registerable nodes ("
+ itos(MAX_REGISTERED_CONTENT+1)
+ ") exceeded (" + name + ")");