summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-21 00:55:11 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-01-21 00:55:11 -0700
commitdedc22adc4f54a69b0c6294aae337eac39608bac (patch)
treea7e03d6dcf80e18561aa61af7c8cbad89d21f1e9
parentd2b26dbb9a0f41a9d495ee8554baf134b4c54ff1 (diff)
Prevent builders from being able to build Digtron components, it's silly
-rw-r--r--node_builders.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/node_builders.lua b/node_builders.lua
index 27db586..ec1bcb3 100644
--- a/node_builders.lua
+++ b/node_builders.lua
@@ -144,6 +144,9 @@ minetest.register_node("digtron:builder", {
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
+ if minetest.get_item_group(stack:get_name(), "digtron") ~= 0 then
+ return 0 -- don't allow builders to be set to build Digtron nodes, they'll just clog the output.
+ end
local inv = minetest.get_inventory({type="node", pos=pos})
inv:set_stack(listname, index, stack:take_item(1))
return 0