Page 1 of 1
[1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Fri Jul 01, 2022 10:01 am
by Sopel
https://wiki.factorio.com/Prototype/Sel ... le_filters when set to an empty table (={}), along with filter_mode set to "whitelist", results in everything being whitelisted, which is consistent with the filter being nil. An empty whitelist should mean nothing is allowed.
Re: [1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Fri Jul 01, 2022 6:13 pm
by Rseding91
What is the utility in an empty whitelist mode essentially saying 'nothing can be selected by this'? Why have it exist at all if it can not select anything?
Re: [1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Fri Jul 01, 2022 6:23 pm
by Xoriun
The suggested behaviour could be a protection against basically setting a map to public by removing the last entry of the whitelist.
But I don't really know if that is enough reason.
Re: [1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Sat Jul 02, 2022 7:59 pm
by Rseding91
An empty whitelist being 'allow all' does seem wrong. But the fix seems like it should be: if whitelist and the list is empty throw an error. Unless someone has a use-case for an empty whitelist mode they can think of.
Re: [1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Sat Jul 02, 2022 8:12 pm
by robot256
(This is about selection tool items, not multiplayer game allowed players lists)
What if you want the player to select an area with a tool to get the coordinates, but don't want any entities to be highlighted when doing so? That's the behavior I would expect if it worked how Sopel expected. Or is there a better way to get the same effect?
Re: [1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Sun Jul 03, 2022 7:26 am
by curiosity
robot256 wrote: Sat Jul 02, 2022 8:12 pm
What if you want the player to select an area with a tool to get the coordinates, but don't want any entities to be highlighted when doing so? That's the behavior I would expect if it worked how Sopel expected. Or is there a better way to get the same effect?
SelectionTool.selection_mode
The actual concern here should be about the flags described as "normal rules". Can these "normal rules" be decomposed into a set of rules that will let you avoid setting filters? For example, what if someone wants a selection of blueprintable entities and only entities specifically? Or tiles?
Re: [1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Tue Jul 05, 2022 11:29 am
by Klonan
robot256 wrote: Sat Jul 02, 2022 8:12 pm
What if you want the player to select an area with a tool to get the coordinates, but don't want any entities to be highlighted when doing so?
This is quite easy, you can just combine two mutually exclusive type filters in the selection mode, such a `friend` and `enemy`:
Code: Select all
selection_mode = {"friend", "enemy"}
Re: [1.1.61] Empty whitelist filter in selection-tool.*_filters is treated as no filter.
Posted: Mon Mar 06, 2023 5:25 pm
by boskid
Thanks for the report. If your intention is to not select any entities you can use the "nothing" selection_mode flags.