Disallow putting items into crafting output slot
This commit is contained in:
parent
78306e6e2a
commit
8eff007aab
@ -540,6 +540,18 @@ function crafting.update_crafting_formspec(player)
|
|||||||
player:set_inventory_formspec(crafting.get_formspec(name))
|
player:set_inventory_formspec(crafting.get_formspec(name))
|
||||||
end
|
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)
|
minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info)
|
||||||
if action == "move" then
|
if action == "move" then
|
||||||
if inventory_info.from_list == "craft_in" or inventory_info.to_list == "craft_in" then
|
if inventory_info.from_list == "craft_in" or inventory_info.to_list == "craft_in" then
|
||||||
|
Loading…
Reference in New Issue
Block a user