Do not move item if not cookable or fuel
This commit is contained in:
parent
2e93c6c4a4
commit
1d7d0ec1d5
2
init.lua
2
init.lua
@ -64,7 +64,6 @@ local function splurp_node(name, def)
|
|||||||
elseif minetest.get_craft_result({method = "fuel", width = 1, items = {stack}}).time ~= 0 then
|
elseif minetest.get_craft_result({method = "fuel", width = 1, items = {stack}}).time ~= 0 then
|
||||||
return "fuel"
|
return "fuel"
|
||||||
end
|
end
|
||||||
return "src"
|
|
||||||
end
|
end
|
||||||
over.allow_metadata_inventory_put = function(pos, listname, index, stack, ...)
|
over.allow_metadata_inventory_put = function(pos, listname, index, stack, ...)
|
||||||
if listname ~= "cooksneak" then
|
if listname ~= "cooksneak" then
|
||||||
@ -72,6 +71,7 @@ local function splurp_node(name, def)
|
|||||||
end
|
end
|
||||||
local inv = minetest.get_meta(pos):get_inventory()
|
local inv = minetest.get_meta(pos):get_inventory()
|
||||||
local output = cooklist(stack)
|
local output = cooklist(stack)
|
||||||
|
if not output then return 0 end
|
||||||
local ret, ret_t = pack(allow_put(pos, output, index, stack, ...))
|
local ret, ret_t = pack(allow_put(pos, output, index, stack, ...))
|
||||||
ret_t[1] = math.min(ret_t[1], room_in_list(inv, output, stack))
|
ret_t[1] = math.min(ret_t[1], room_in_list(inv, output, stack))
|
||||||
return ret()
|
return ret()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user