Disallow putting items into crafting output slot

This commit is contained in:
Wuzzy 2019-08-31 19:59:44 +02:00
parent 78306e6e2a
commit 8eff007aab

View File

@ -540,6 +540,18 @@ function crafting.update_crafting_formspec(player)
player:set_inventory_formspec(crafting.get_formspec(name))
end
minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info)
if action == "put" then
if inventory_info.listname == "craft_out" then
return 0
end
elseif action == "move" then
if inventory_info.to_list == "craft_out" then
return 0
end
end
end)
minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info)
if action == "move" then
if inventory_info.from_list == "craft_in" or inventory_info.to_list == "craft_in" then