Make recipe separatable by required usage.

This commit is contained in:
SFENCE 2022-04-18 18:21:03 +02:00
parent 5ad535a633
commit b6afb49e24
2 changed files with 11 additions and 0 deletions

View File

@ -272,6 +272,16 @@ function appliance:recipe_aviable_input(inventory)
break; break;
end end
end end
if valid and (check.require_usage~=nil) then
valid = false
if (self.have_usage) then
local usage_stack = inventory:get_stack(self.use_stack, 1)
local usage_name = usage_stack:get_name();
if (check.require_usage[usage_name]) then
valid = true
end
end
end
if valid then if valid then
input = check; input = check;
break; break;

View File

@ -193,3 +193,4 @@ function appliances.add_item_help(item_name, text_to_add)
}) })
end end
end end