minerchest: log when combination recipe is invalid.
Minerchest accepts via API only combination recipes that are simple (one-type crafting) and reversible. If this condition cannot be fulfilled, be verbose and log a warning. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This commit is contained in:
parent
f2ef341f79
commit
40ee72f8be
@ -125,6 +125,8 @@ function minerchest.allow_item_combine(source_item, block_item)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not fis or not fib then
|
if not fis or not fib then
|
||||||
|
minetest.log("warning", "minerchest: no combination recipe for (\"" ..
|
||||||
|
sn .. "\", \"" .. bn.. "\") - skipping.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
-- verify if recipe is reversible
|
-- verify if recipe is reversible
|
||||||
@ -150,6 +152,8 @@ function minerchest.allow_item_combine(source_item, block_item)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not isrev then
|
if not isrev then
|
||||||
|
minetest.log("warning", "minerchest: combination recipe (\"" ..
|
||||||
|
sn .. "\", \"" .. bn.. "\") is not reversible - skipping.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
combdata[sn] = { items = fis, output = fib }
|
combdata[sn] = { items = fis, output = fib }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user