catalysis recipe fixes
This commit is contained in:
parent
dfc1ea7507
commit
6cf3745335
1 changed files with 28 additions and 26 deletions
|
|
@ -14,36 +14,38 @@ local recipes_to_update = {
|
|||
|
||||
local prefix = "catalyzed-"
|
||||
for i, recipe_name in pairs(recipes_to_update) do
|
||||
-- create a copy of the recipe
|
||||
local r = futil.table.deepcopy(data.raw.recipe[recipe_name])
|
||||
new_name = prefix..r.name
|
||||
r.name = new_name
|
||||
if data.raw.recipe[recipe_name] then
|
||||
-- create a copy of the recipe
|
||||
local r = futil.table.deepcopy(data.raw.recipe[recipe_name])
|
||||
new_name = prefix..r.name
|
||||
r.name = new_name
|
||||
|
||||
if string.find(new_name, "cracking") then
|
||||
r.localised_name = {"", {"recipe-name.catalyzed"}, " ", {"recipe-name."..recipe_name}}
|
||||
else
|
||||
local s
|
||||
s, _ = string.find(recipe_name, "-from-") -- bit of a hack
|
||||
r.main_product = string.sub(recipe_name, 1, s-1)
|
||||
end
|
||||
if string.find(new_name, "cracking") then
|
||||
r.localised_name = {"", {"recipe-name.catalyzed"}, " ", {"recipe-name."..recipe_name}}
|
||||
else
|
||||
local s
|
||||
s, _ = string.find(recipe_name, "-from-") -- bit of a hack
|
||||
r.main_product = string.sub(recipe_name, 1, s-1)
|
||||
end
|
||||
|
||||
-- copy should require 1 catalyst, and have 90% chance to return 1 catalyst
|
||||
data:extend({r})
|
||||
util.add_ingredient(new_name, "ptpd-catalyst", 1, {force=true})
|
||||
util.add_product(new_name, {type="item", name="ptpd-catalyst", amount=1,
|
||||
catalyst_amount=1, probability=.9}, {force=true})
|
||||
util.add_icon(new_name, {icon="__bzgold__/graphics/icons/ptpd-catalyst.png",
|
||||
icon_size=128, scale=0.124, shift={8,-8}})
|
||||
-- copy should require 1 catalyst, and have 90% chance to return 1 catalyst
|
||||
data:extend({r})
|
||||
util.add_ingredient(new_name, "ptpd-catalyst", 1, {force=true})
|
||||
util.add_product(new_name, {type="item", name="ptpd-catalyst", amount=1,
|
||||
catalyst_amount=1, probability=.9}, {force=true})
|
||||
util.add_icon(new_name, {icon="__bzgold__/graphics/icons/ptpd-catalyst.png",
|
||||
icon_size=128, scale=0.124, shift={8,-8}})
|
||||
|
||||
-- halve the time of the copy recipe
|
||||
util.multiply_time(new_name, 0.5, {force=true})
|
||||
-- halve the time of the copy recipe
|
||||
util.multiply_time(new_name, 0.5, {force=true})
|
||||
|
||||
-- copy should be unlocked by "catalysis"
|
||||
util.add_unlock("catalysis", new_name)
|
||||
|
||||
-- add 10 to the input oil ingredients of the basic recipe
|
||||
for j, fluid in pairs({"heavy-oil", "light-oil", "petroleum-gas"}) do
|
||||
util.add_to_ingredient(recipe_name, fluid, 10)
|
||||
-- copy should be unlocked by "catalysis"
|
||||
util.add_unlock("catalysis", new_name)
|
||||
|
||||
-- add 10 to the input oil ingredients of the basic recipe
|
||||
for j, fluid in pairs({"heavy-oil", "light-oil", "petroleum-gas"}) do
|
||||
util.add_to_ingredient(recipe_name, fluid, 10)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue