diff options
Diffstat (limited to 'filter-injector.lua')
-rw-r--r-- | filter-injector.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/filter-injector.lua b/filter-injector.lua index 20a9d44..620b7b3 100644 --- a/filter-injector.lua +++ b/filter-injector.lua @@ -181,12 +181,25 @@ for _, data in ipairs({ end, after_dig_node = pipeworks.after_dig, on_receive_fields = function(pos, formname, fields, sender) + if not pipeworks.may_configure(pos, sender) then return end fs_helpers.on_receive_fields(pos, fields) local meta = minetest.get_meta(pos) meta:set_int("slotseq_index", 1) set_filter_formspec(data, meta) set_filter_infotext(data, meta) end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if not pipeworks.may_configure(pos, player) then return 0 end + return stack:get_count() + end, + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if not pipeworks.may_configure(pos, player) then return 0 end + return stack:get_count() + end, + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + if not pipeworks.may_configure(pos, player) then return 0 end + return count + end, can_dig = function(pos, player) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() |