Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.on_event({defines.events.on_init},
- function(e)
- removed_items = {"transport-belt", "fast-transport-belt"}
- for name, recipe in pairs(data.raw.recipe) do
- if recipe.result then
- for _, removeName in ipairs(removed_items) do
- if recipe.result == removeName then
- recipe.enabled = false
- disabled_recipes[name] = name
- end
- end
- elseif recipe.results then
- for ingredientIndex, ingredient in pairs(recipe.results) do
- for _, removeName in ipairs(removed_items) do
- if (ingredient.name and ingredient.name == removeName) or (ingredient[1] and ingredient[1] == removeName ) then
- recipe.enabled = false
- disabled_recipes[name] = name
- end
- end
- end
- end
- end
- for name, technology in pairs(data.raw.technology) do
- if technology.effects then
- for index=#technology.effects,1,-1 do
- local effect = technology.effects[index]
- if effect.type == "unlock_recipe" then
- if disabled_recipes[effect.recipe] then
- table.remove(technology.effects, index)
- end
- end
- end
- end
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment