choose-elem-button refresh filters
Posted: Wed Sep 09, 2020 6:12 am
I have a GUI choose-elem-button, with filters:
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)
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"}
}
}
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)