forked from MineClone5/MineClone5
Allow to place 1 empty bucket into furnace fuel
This commit is contained in:
parent
4b6c9e3192
commit
face46e7aa
|
@ -62,6 +62,15 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if listname == "fuel" then
|
if listname == "fuel" then
|
||||||
|
-- Special case: empty bucket (not a fuel, but used for sponge drying)
|
||||||
|
if stack:get_name() == "bucket:bucket_empty" then
|
||||||
|
if inv:get_stack(listname, index):get_count() == 0 then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Test stack with size 1 because we burn one fuel at a time
|
-- Test stack with size 1 because we burn one fuel at a time
|
||||||
local teststack = ItemStack(stack)
|
local teststack = ItemStack(stack)
|
||||||
teststack:set_count(1)
|
teststack:set_count(1)
|
||||||
|
|
Loading…
Reference in New Issue