Make recipe separatable by required usage.
This commit is contained in:
parent
5ad535a633
commit
b6afb49e24
@ -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;
|
||||||
|
@ -193,3 +193,4 @@ function appliances.add_item_help(item_name, text_to_add)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user