remove add_titanium_ingredient
This commit is contained in:
parent
e108a78933
commit
20366198fb
4 changed files with 11 additions and 44 deletions
33
me.lua
33
me.lua
|
|
@ -16,10 +16,6 @@ else
|
|||
me.titanium_processing = "titanium-processing"
|
||||
end
|
||||
|
||||
function me.add_titanium_ingredient(amount, name)
|
||||
add_ingredient(name, me.titanium_plate, amount)
|
||||
end
|
||||
|
||||
function me.get_setting(name)
|
||||
if settings.startup[name] == nil then
|
||||
return nil
|
||||
|
|
@ -39,33 +35,4 @@ if me.get_setting(me.name.."-recipe-bypass") then
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- TODO These helpers are all duplicates, remove them
|
||||
--
|
||||
|
||||
function add_ingredient(recipe_name, ingredient, quantity)
|
||||
if me.bypass[recipe_name] then return end
|
||||
if data.raw.recipe[recipe_name] and data.raw.item[ingredient] then
|
||||
xadd_ingredient(data.raw.recipe[recipe_name], ingredient, quantity)
|
||||
xadd_ingredient(data.raw.recipe[recipe_name].normal, ingredient, quantity)
|
||||
xadd_ingredient(data.raw.recipe[recipe_name].expensive, ingredient, quantity)
|
||||
end
|
||||
end
|
||||
|
||||
function xadd_ingredient(recipe, ingredient, quantity)
|
||||
if recipe ~= nil and recipe.ingredients ~= nil then
|
||||
for i, existing in pairs(recipe.ingredients) do
|
||||
if existing[1] == ingredient or existing.name == ingredient then
|
||||
log("Not adding "..ingredient.." -- duplicate")
|
||||
return
|
||||
end
|
||||
end
|
||||
table.insert(recipe.ingredients, {ingredient, quantity})
|
||||
end
|
||||
end
|
||||
--
|
||||
-- End duplicates
|
||||
--
|
||||
|
||||
return me
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@ if mods["Krastorio2"] then
|
|||
util.replace_ingredient("stack-inserter", "steel-plate", "titanium-plate")
|
||||
util.replace_ingredient("stack-filter-inserter", "steel-plate", "titanium-plate")
|
||||
|
||||
util.me.add_titanium_ingredient(40, "kr-advanced-steam-turbine")
|
||||
util.add_ingredient("kr-advanced-steam-turbine", util.me.titanium_plate, 40)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if mods["Aircraft"] then
|
|||
util.replace_ingredient("gunship", "steel-plate", "titanium-plate")
|
||||
util.replace_ingredient("cargo-plane", "steel-plate", "titanium-plate")
|
||||
util.replace_ingredient("flying-fortress", "steel-plate", "titanium-plate")
|
||||
util.me.add_titanium_ingredient(10, "aircraft-afterburner")
|
||||
util.add_ingredient("aircraft-afterburner", util.me.titanium_plate, 10)
|
||||
|
||||
-- jet doesn't use steel in base aircraft mod, but leave this here just in case that changes
|
||||
util.replace_ingredient("jet", "steel-plate", "titanium-plate")
|
||||
|
|
@ -33,7 +33,7 @@ if mods["Hovercrafts"] or mods["Hovercrafts_Realism"] then
|
|||
end
|
||||
|
||||
if mods["Raven"] then
|
||||
util.me.add_titanium_ingredient(100, "raven")
|
||||
util.add_ingredient("raven", util.me.titanium_plate, 100)
|
||||
end
|
||||
|
||||
if mods["Hover-Car"] then
|
||||
|
|
|
|||
|
|
@ -47,17 +47,17 @@ if data.raw.recipe["se-space-pipe"] then
|
|||
util.replace_ingredient("se-space-underground-belt", "steel-plate", "titanium-plate")
|
||||
util.replace_ingredient("se-space-splitter", "steel-plate", "titanium-plate")
|
||||
util.replace_ingredient("se-space-rail", "steel-plate", "titanium-plate")
|
||||
util.me.add_titanium_ingredient(1, "se-space-platform-scaffold")
|
||||
util.add_ingredient("se-space-platform-scaffold", util.me.titanium_plate, 1)
|
||||
|
||||
-- Space Exploration alternative LDS
|
||||
util.replace_ingredient("se-low-density-structure-beryllium", "steel-plate", "titanium-plate")
|
||||
|
||||
-- Space Exploration buildings
|
||||
util.me.add_titanium_ingredient(20, "se-condenser-turbine")
|
||||
util.add_ingredient("se-condenser-turbine", util.me.titanium_plate, 20)
|
||||
|
||||
-- A couple more deeper tech thematic items to use titanium in.
|
||||
util.me.add_titanium_ingredient(2, "se-lattice-pressure-vessel")
|
||||
util.me.add_titanium_ingredient(2, "se-aeroframe-bulkhead")
|
||||
util.add_ingredient("se-lattice-pressure-vessel", util.me.titanium_plate, 2)
|
||||
util.add_ingredient("se-aeroframe-bulkhead", util.me.titanium_plate, 2)
|
||||
|
||||
util.add_ingredient("se-experimental-alloys-data", "titanium-plate", 1)
|
||||
util.add_to_product("se-experimental-alloys-data", "se-experimental-alloys-data", 1)
|
||||
|
|
@ -68,9 +68,9 @@ end
|
|||
|
||||
|
||||
-- Also add titanium to some nuclear steam-handling stuff
|
||||
util.me.add_titanium_ingredient(20, "steam-turbine")
|
||||
util.add_ingredient("steam-turbine", util.me.titanium_plate, 20)
|
||||
if not mods["pyrawores"] then
|
||||
util.me.add_titanium_ingredient(20, "heat-exchanger")
|
||||
util.add_ingredient("heat-exchanger", util.me.titanium_plate, 20)
|
||||
util.add_prerequisite("nuclear-power", util.me.titanium_processing)
|
||||
end
|
||||
|
||||
|
|
@ -89,11 +89,11 @@ if mods["eve-weaponry"] then
|
|||
end
|
||||
|
||||
if mods["FastFurnaces"] then
|
||||
util.me.add_titanium_ingredient(1, "fast-long-handed-inserter")
|
||||
util.add_ingredient("fast-long-handed-inserter", util.me.titanium_plate, 1)
|
||||
end
|
||||
|
||||
if mods["NuclearFurnace"] then
|
||||
util.me.add_titanium_ingredient(200, "nuclear-furnace-4")
|
||||
util.add_ingredient("nuclear-furnace-4", util.me.titanium_plate, 200)
|
||||
end
|
||||
|
||||
-- Useful Equipment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue