I'm currently working on an abstraction layer over LuaPlayer.request_translation to make it easier for mods to support localised search. For this it would be great if I could read the user prefererence for normal/fuzzy search instead of having to add a seperate mod setting for it.
(I saw that LuaPlayer.auto_sort_main_inventory was implemented based on a similar request.)
Thanks in advance!
Read access to interface setting "Fuzzy search"
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Read access to interface setting "Fuzzy search"
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Read access to interface setting "Fuzzy search"
This is one of those "unlikely to happen" because the fuzzy search flag is not part of the game state. It only changes parts of the view but you can change it while playing and there are no input actions sent for that.
auto_sort_main_inventory was different story as it has to be part of the game state because at the end of a tick in which player's inventory was changed a game state has to know if that inventory should be sorted or not and this decision has to be the same on all clients in MP.
auto_sort_main_inventory was different story as it has to be part of the game state because at the end of a tick in which player's inventory was changed a game state has to know if that inventory should be sorted or not and this decision has to be the same on all clients in MP.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Read access to interface setting "Fuzzy search"
Given the growing amount of mods that let the user search things this would be another great step towards bringing a vanilla feel to modded interfaces thoughboskid wrote: Fri Jun 04, 2021 8:32 am This is one of those "unlikely to happen" because the fuzzy search flag is not part of the game state.


Mods that could benefit from this:
Helmod, Factory Planner, Recipe Book, FNEI, etcpp.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
The fuzzy search state accessible from LuaPlayer
TL;DR
I would like to know about the user preferred search type (fuzzy or not)What ?
We already have an option on LuaPlayer for the alt-mode:- show_entity_info :: boolean [RW] (Show overlay icons on entities)
Let's expand it with one more option:
- fuzzy_search :: boolean [R] or [RW]
Why ?
Thus, all mods that add search to their GUI will be able to use a single parameter that will be configured by the user at once for all mods and search fields.Now each mod adds it in different places (in a "per user" settings or in GUI frames) and duplicates the setting for these mods.
Re: Read access to interface setting "Fuzzy search"
merged with existing topic
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...