From c7c61d05fb8bcd7a782c625b80c1966e3af98780 Mon Sep 17 00:00:00 2001 From: Niklp09 <89982526+Niklp09@users.noreply.github.com> Date: Wed, 15 Feb 2023 18:17:00 +0100 Subject: [PATCH] fix sigsegv's due autocrafter --- basic_machines/autocrafter.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/basic_machines/autocrafter.lua b/basic_machines/autocrafter.lua index 4212bc2..8402c4e 100644 --- a/basic_machines/autocrafter.lua +++ b/basic_machines/autocrafter.lua @@ -266,6 +266,9 @@ end local function allow_metadata_inventory_put(pos, listname, index, stack, player) + if listname == "output" then + return 0 + end if minetest.is_protected(pos, player:get_player_name()) then return 0 end @@ -285,6 +288,9 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player) end local function allow_metadata_inventory_take(pos, listname, index, stack, player) + if listname == "output" then + return 0 + end if minetest.is_protected(pos, player:get_player_name()) then return 0 end @@ -302,6 +308,9 @@ local function allow_metadata_inventory_take(pos, listname, index, stack, player end local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) + if from_list == "output" or "to_list" == "output" then + return 0 + end if minetest.is_protected(pos, player:get_player_name()) then return 0 end