Cedric Haase
2021-01-06 11e43ffe134f6483905b18662a544dec384b231c
technic/machines/other/injector.lua
@@ -16,7 +16,7 @@
            if stack then
            local item0=stack:to_table()
            if item0 then
               item0["count"] = "1"
               item0["count"] = 1
               technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0)
               stack:take_item(1)
               inv:set_stack("main", i, stack)
@@ -40,7 +40,7 @@
            end
         end
      end
end
minetest.register_craft({
@@ -117,6 +117,8 @@
      return inv:is_empty("main")
   end,
   on_receive_fields = function(pos, formanme, fields, sender)
      if minetest.is_protected(pos, sender:get_player_name()) then return end
      local meta = minetest.get_meta(pos)
      if fields.mode_item then meta:set_string("mode", "single items") end
      if fields.mode_stack then meta:set_string("mode", "whole stacks") end