Page 1 of 1

[2.0.76] LuaPrototypes#get_item_filtered documentation bug

Posted: Tue May 12, 2026 2:11 am
by hgschmie
https://lua-api.factorio.com/latest/cla ... m_filtered states
Screenshot 2026-05-11 at 19.10.07.png
Screenshot 2026-05-11 at 19.10.07.png (60.41 KiB) Viewed 164 times
However, within the debugger I get
Screenshot 2026-05-11 at 19.10.45.png
Screenshot 2026-05-11 at 19.10.45.png (70.6 KiB) Viewed 164 times
because the correct field name is 'filter', not 'filters'

Re: [2.0.76] LuaPrototypes#get_items_filtered documentation bug

Posted: Tue May 12, 2026 3:27 am
by boskid
You seem to be confused with 'filter' from https://lua-api.factorio.com/latest/con ... ilter.html and 'filters' parameter. This method does not take named parameters, it directly takes one parameter which is a table. Name "filters" should not appear here in your code.

Re: [2.0.76] LuaPrototypes#get_item_filtered documentation bug

Posted: Tue May 12, 2026 5:52 pm
by hgschmie
I think I get what you are saying. Basically, it should be

prototypes.get_item_filtered { { filter = 'type', type = 'fuel' }, } and not prototypes.get_item_filtered { { filter = 'fuel' }, }

That makes me curious why the second form worked at all.