mirror of
https://github.com/minetest-mods/digtron.git
synced 2025-01-03 09:37:27 +01:00
Prevent builders from being able to build Digtron components, it's silly
This commit is contained in:
parent
d2b26dbb9a
commit
dedc22adc4
@ -144,6 +144,9 @@ minetest.register_node("digtron:builder", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
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})
|
local inv = minetest.get_inventory({type="node", pos=pos})
|
||||||
inv:set_stack(listname, index, stack:take_item(1))
|
inv:set_stack(listname, index, stack:take_item(1))
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user