I want to build a GUI where a technology can be selected. I tried to use the "choose-elem-button". But I cannot find how to filter researched or not researched technologies. The documentation seems to accept only a few options, but I want to have more.
https://lua-api.factorio.com/latest/Con ... ypeFilters
Or do I misunderstand the things here. Or are there other options (except programming it by myself). Utility-mods are also welcome.
TechnologyPrototypeFilters for researched/not researched
TechnologyPrototypeFilters for researched/not researched
Mods: ingteb, ixuClock, ixuAutoSave, NoCheating, hardCrafting (Maintainer) and more
Desperately tried to implement redo
Desperately tried to implement redo
Re: TechnologyPrototypeFilters for researched/not researched
I don't got your point.
Here you see a code sample:
Would you mind changing this so that the selection panel will show only researched technologies?
Here you see a code sample:
Code: Select all
local button = frame.add {
type = 'choose-elem-button',
name = "Technology",
elem_type = "technology",
elem_filters = filter,
}
Mods: ingteb, ixuClock, ixuAutoSave, NoCheating, hardCrafting (Maintainer) and more
Desperately tried to implement redo
Desperately tried to implement redo
Re: TechnologyPrototypeFilters for researched/not researched
It's not possible. That button type does not work with technologies but technology prototypes. It's force-less and just shows 'technology prototypes'.
If you want to get ahold of me I'm almost always on Discord.
Re: TechnologyPrototypeFilters for researched/not researched
Researched technologies by some force, but not the whole game.
If you add new force, it has no researched technologies, but the first force keeps the same researched technologies.
https://lua-api.factorio.com/latest/Lua ... eate_force #LuaGameScript.create_force
You can always make new force (up to 64 forces) and switch your force with:
Code: Select all
/c game.player.force = game.create_force("new_force")