choose-elem-button refresh filters

Place to get help with not working mods / modding interface.
Post Reply
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

choose-elem-button refresh filters

Post 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)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: choose-elem-button refresh filters

Post by Rseding91 »

Currently the choose-elem-button works with prototypes; it doesn't do live versions of recipes/technologies.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding help”