Change selection tool "entity filters" in control stage

Place to get help with not working mods / modding interface.
Sajicek
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Mar 17, 2022 4:41 pm
Contact:

Change selection tool "entity filters" in control stage

Post by Sajicek »

Hey, first of all sorry if this has been asked before, but I tried looking for an answer, but unsuccessfully.

So in data stage / prototype definition I know I can define the "entity_filters" and "entity_type_filters" to a new prototype of type="selection tool", but those are static and I need my selection tool to be able to toggle some of the filters on and off.

In control stage, I've found that there are "entity_filters" and "set_entity_filter()" method in LuaItemStack, but both are locked to only "DeconstructionItem".
Is there a reason for it to not be applicable to the selection tool?
Is there a workaround this restriction to allow me to change the SelectionTool filters?
Or is the only way to achieve the different filters on SelectionTool to just make prototype for each combination?

Also just to clarify I can't use the DeconstructionItem type, since according to wiki it forces selection_mode="deconstruct" which doesn't work for my purpose.

Thanks in advance :)
Post Reply

Return to “Modding help”