Skip to content

Commit

Permalink
Merge pull request #118 from Niklp09/autocrafter
Browse files Browse the repository at this point in the history
fix sigsegv's due autocrafter
  • Loading branch information
joe7575 authored Feb 16, 2023
2 parents 68a8555 + c7c61d0 commit 633e1e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions basic_machines/autocrafter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 633e1e9

Please sign in to comment.