Page 1 of 1

choose-elem-button refresh filters

Posted: Wed Sep 09, 2020 6:12 am
by PFQNiet
I have a GUI choose-elem-button, with filters:

Code: Select all

flow.add{
  type = "choose-elem-button",
  name = "selected-item",
  elem_type = "recipe",
  elem_filters = {
    {filter="category", category="smelting"},
    {mode="and", filter="enabled"}
  }
}
This works initially, but when more recipes are enabled (by researching them), they don't show up in the GUI's selection view. This holds true even if I clear the GUI and re-build it. It seems like "enabled" is based on the recipe prototype, not the player/force having unlocked them...

Is it possible to have the filter work based on what the force has unlocked, or will I need to build a custom GUI to handle that? (eg. a drop-down list of unlocked recipes)

Re: choose-elem-button refresh filters

Posted: Mon Sep 14, 2020 7:02 pm
by Rseding91
Currently the choose-elem-button works with prototypes; it doesn't do live versions of recipes/technologies.