Page 1 of 1
LuaGuiElement Inventory filter slots
Posted: Tue Aug 11, 2026 8:27 pm
by PennyJim
Standard filter slots work fine, but when pointing at an inventory that's filtered in an alternative way (eg crafter input) it does not appear. I request there be some mechanism to support these filters, which I understand might be difficult depending on current code structure. Alongside this feature, I think a "filter_style" argument would be nice so we could disable or customize the blue tinge that filter slots have.
Ignore the extra input slots, that was me trying something out with negative margins and padding which did not work out.

- Attempted recreation of crafter gui
- 08-11-2026, 14-15-31.png (109.03 KiB) Viewed 276 times
Re: LuaGuiElement Inventory filter slots
Posted: Wed Aug 12, 2026 12:35 am
by Shemp
+1. The fact that slots don't inherit their appearance from the target inventory (by default) almost seems like a misfeature, especially because a filtered slot will prevent users from placing non-matching items into it, and it's up to the modder to take care of marking it.
Re: LuaGuiElement Inventory filter slots
Posted: Wed Aug 12, 2026 1:32 am
by Rseding91
Inventory filters are fully supported. Things like crafting machines *do not use filters*, instead they use secondary logic to restrict what can go into a slot based on the active recipe. The custom gui logic does not have special case logic to account for displaying those restrictions.
It does have special case logic to handle generic inventory with filters (such as cargo wagons).
Re: LuaGuiElement Inventory filter slots
Posted: Wed Aug 12, 2026 1:54 am
by protocol_1903
Rseding91 wrote: Wed Aug 12, 2026 1:32 am
Inventory filters are fully supported. Things like crafting machines *do not use filters*, instead they use secondary logic to restrict what can go into a slot based on the active recipe. The custom gui logic does not have special case logic to account for displaying those restrictions.
Would it be possible to add some way to render these psuedo-filters manually, like
EmptySlotInfo per slot? Or would that be something that needs to be hacked together with sprites layered on top of the inventory elements?
Re: LuaGuiElement Inventory filter slots
Posted: Wed Aug 12, 2026 2:25 am
by PennyJim
protocol_1903 wrote: Wed Aug 12, 2026 1:54 am
Would it be possible to add some way to render these psuedo-filters manually, like
EmptySlotInfo per slot?
Ditto. A solution to be able to recreate this logic manually would be sufficient, and might in fact be a better resolution.
I can imagine it being used alongside someone's manual handling of cursor actions
Re: LuaGuiElement Inventory filter slots
Posted: Wed Aug 12, 2026 8:16 pm
by Rseding91
I've added some special-case handling for the next release so it will include the info for assembling machine inputs and outputs.