check recipe exists before adding to
This commit is contained in:
parent
a4cdc8a947
commit
44965bf3aa
1 changed files with 3 additions and 1 deletions
|
|
@ -2,7 +2,9 @@ local data_util = {}
|
||||||
|
|
||||||
--- Add a given quantity of titanium plates to a given recipe
|
--- Add a given quantity of titanium plates to a given recipe
|
||||||
function data_util.add_titanium_ingredient(quantity, recipe)
|
function data_util.add_titanium_ingredient(quantity, recipe)
|
||||||
|
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||||
table.insert(recipe.ingredients, {"titanium-plate", quantity})
|
table.insert(recipe.ingredients, {"titanium-plate", quantity})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Add titanium processing as a prerequisite to a given technology
|
--- Add titanium processing as a prerequisite to a given technology
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue