Read access to interface setting "Fuzzy search"

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Read access to interface setting "Fuzzy search"

Post 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
fuzzy.png (14.96 KiB) Viewed 1031 times
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.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Read access to interface setting "Fuzzy search"

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

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Read access to interface setting "Fuzzy search"

Post 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 :mrgreen: ! 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.
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.

saaadel
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sat Jun 19, 2021 3:09 am
Contact:

The fuzzy search state accessible from LuaPlayer

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

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Read access to interface setting "Fuzzy search"

Post by ssilk »

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...

Post Reply

Return to “Modding interface requests”