forked from cacklingfiend/bzgold2
add things
This commit is contained in:
parent
03f8884093
commit
21dc3e77c0
3 changed files with 25 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
require("stacking")
|
require("stacking")
|
||||||
|
require("prototypes/electronic-circuit-final")
|
||||||
require("modules")
|
require("modules")
|
||||||
-- require("tin-recipe-final-5d")
|
-- require("tin-recipe-final-5d")
|
||||||
-- require("tin-recipe-final-rrr")
|
-- require("tin-recipe-final-rrr")
|
||||||
|
|
@ -11,5 +12,8 @@ if mods["space-exploration"] then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
util.replace_ingredient("textplate-small-gold", "sulfur", "gold-ingot")
|
||||||
|
util.replace_ingredient("textplate-large-gold", "sulfur", "gold-ingot")
|
||||||
|
|
||||||
-- Must be last
|
-- Must be last
|
||||||
util.create_list()
|
util.create_list()
|
||||||
|
|
|
||||||
|
|
@ -312,6 +312,21 @@ function util.add_unlock(technology_name, recipe)
|
||||||
util.add_effect(technology_name, {type="unlock-recipe", recipe=recipe})
|
util.add_effect(technology_name, {type="unlock-recipe", recipe=recipe})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if a tech unlocks a recipe
|
||||||
|
function util.check_unlock(technology_name, recipe)
|
||||||
|
local technology = data.raw.technology[technology_name]
|
||||||
|
if technology and technology.effects then
|
||||||
|
for i, effect in pairs(technology.effects) do
|
||||||
|
if effect.type == "unlock-recipe" and effect.recipe == recipe_name then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- remove recipe unlock effect from a given technology, multiple times if necessary
|
-- remove recipe unlock effect from a given technology, multiple times if necessary
|
||||||
function util.remove_recipe_effect(technology_name, recipe_name)
|
function util.remove_recipe_effect(technology_name, recipe_name)
|
||||||
local technology = data.raw.technology[technology_name]
|
local technology = data.raw.technology[technology_name]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
-- Enable prod modules for some recipes
|
-- Enable prod modules for some recipes
|
||||||
-- Recipes with very specific ratios are deliberately excluded
|
-- Recipes with very specific ratios are deliberately excluded
|
||||||
recipes = {}
|
recipes = {
|
||||||
|
"electronic-circuit-silver", "silver-plate", "silver-wire",
|
||||||
|
"gold-ingot", "platinum-ingot", "palladium-ingot",
|
||||||
|
"temperature-sensor", "mlcc",
|
||||||
|
}
|
||||||
|
|
||||||
if mods["Krastorio2"] then
|
if mods["Krastorio2"] then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue