Page 1 of 1
Read access to interface setting "Fuzzy search"
Posted: Thu Jun 03, 2021 2:34 pm
by eradicator
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!

- fuzzy.png (14.96 KiB) Viewed 1335 times
Re: Read access to interface setting "Fuzzy search"
Posted: Fri Jun 04, 2021 8:32 am
by boskid
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.
Re: Read access to interface setting "Fuzzy search"
Posted: Fri Jun 04, 2021 12:32 pm
by eradicator
boskid 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.
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 though

! So I don't think I'm be the only one wanting this. Every mod having a seperate setting for this is clearly undesirable. I'm not in a hurry though, so maybe for the addon

?
Mods that could benefit from this:
Helmod, Factory Planner, Recipe Book, FNEI, etcpp.
The fuzzy search state accessible from LuaPlayer
Posted: Sun Jun 20, 2021 12:48 pm
by saaadel
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"
Posted: Mon Jun 21, 2021 8:52 am
by ssilk
merged with existing topic