Page 1 of 1

Ability to filter technology_prototypes by effect?

Posted: Sun May 31, 2020 4:43 pm
by mrudat
Could get_filtered_technology_prototypes be extended to support a filter something like the following?

Code: Select all

local technologies_that_unlock_recipe = game.get_filtered_technology_prototypes{
  {
    filter = "effects"
    elem_filters = {
      { type = "unlock-recipe" recipe = "bake-me-a-cake" },
    }
  }
}
I have constructed in a number of places a mapping from item to recipe, and there's a filter to support that, but I also want to lookup technology from recipe, and there is not (yet) a filter to do that.