Page 1 of 1

filter_slot_count error on non-inserter

Posted: Fri Aug 05, 2016 10:17 pm
by binbinhfr
recently you added
request_slot_count :: uint [R] The number of request slots this entity has.
this function returns 0 in case of entities which do not have/support request slots.

and also
filter_slot_count :: uint [R] The number of filter slots this inserter has.
but this variable triggers an error if it's not an inserter.
It would be nice if it returns also 0 in case of any entities that does not have/support filters, no ?

Re: filter_slot_count error on non-inserter

Posted: Sat Aug 06, 2016 4:38 am
by Rseding91
filter_slot_count is specific to the inserter entity - nothing else in the game ever has a non-0 filter slot count.

Also set-filter and get-filter on lua-entity only work with the inserter.

Request filters are something else completely which is why it returns 0 since multiple entities can have them.