Page 1 of 1

Asteroid Collector not counting own contents for "Set Filters"

Posted: Wed Dec 04, 2024 11:36 pm
by TrueMilli
I'd expect this collector to filter for Carbonic & Oxide asteroids, but it doesn't:
12-05-2024, 00-35-18.png
12-05-2024, 00-35-18.png (174.56 KiB) Viewed 324 times
There is nothing on the red wire, it's just to enable circuit network.

Re: Asteroid Collector not counting own contents for "Set Filters"

Posted: Thu Dec 05, 2024 12:16 am
by boskid
This is actually a feature as otherwise reading contents and set filters would have to be made an exclusive mode of operation (so either read content or set filters) and we really wanted to have both possible to enable at the same time. That means there are 2 entities that have slightly different input behavior: asteroid collector and assembling machine, which for most of the input stuff are ignoring their own output values.

Re: Asteroid Collector not counting own contents for "Set Filters"

Posted: Thu Dec 05, 2024 1:03 pm
by TrueMilli
I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).

Re: Asteroid Collector not counting own contents for "Set Filters"

Posted: Thu Dec 05, 2024 1:52 pm
by IsaacOscar
TrueMilli wrote: Thu Dec 05, 2024 1:03 pm I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).
If you want this behaviour, you can trivially do this with a combinator, although it will have a one tick delay.

Count hand contents however cannot be emulated with combinators, so it's more important.

Re: Asteroid Collector not counting own contents for "Set Filters"

Posted: Thu Dec 05, 2024 3:42 pm
by TrueMilli
Another thing: Why is the same behavior not implemented for Requester Chests? There read contents and set filters is exclusive.

Re: Asteroid Collector not counting own contents for "Set Filters"

Posted: Thu Dec 05, 2024 3:44 pm
by TrueMilli
IsaacOscar wrote: Thu Dec 05, 2024 1:52 pm
TrueMilli wrote: Thu Dec 05, 2024 1:03 pm I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).
If you want this behaviour, you can trivially do this with a combinator, although it will have a one tick delay.

Count hand contents however cannot be emulated with combinators, so it's more important.
Actually, it requires a non-trivial amount of combinators, as any cable connected to a collector will add the current contents again - so multiple levels of isolation are required (every collector needs to get the sum of all collectors as input which is not connected directly to another connector via the same wire).

Re: Asteroid Collector not counting own contents for "Set Filters"

Posted: Thu Dec 05, 2024 3:50 pm
by computeraddict
boskid wrote: Thu Dec 05, 2024 12:16 am This is actually a feature as otherwise reading contents and set filters would have to be made an exclusive mode of operation (so either read content or set filters) and we really wanted to have both possible to enable at the same time. That means there are 2 entities that have slightly different input behavior: asteroid collector and assembling machine, which for most of the input stuff are ignoring their own output values.
Not knowing this was a feature, I made a circuit that enables you to use both anyway. If you provide a negative limit signal (say you want 10 metallic and 5 of the others, you'd send -10, -5, -5) then use an arithmetic to invert the sum of your control signal and the collector's read-contents with "each * -1, each", feeding it back to the collector with a different color wire.

Re: Asteroid Collector not counting own contents for "Set Filters"

Posted: Fri Dec 06, 2024 5:37 am
by IsaacOscar
TrueMilli wrote: Thu Dec 05, 2024 3:44 pm
IsaacOscar wrote: Thu Dec 05, 2024 1:52 pm
TrueMilli wrote: Thu Dec 05, 2024 1:03 pm I understand that in general, but it confused me when I wired "identical" collectors together, and they behaved differently - because of different individual contents.

Maybe add an info tooltip detailing the behavior? I'd like it even better if there was a checkbox to toggle the behavior (like for "count hand contents" and in other places).
If you want this behaviour, you can trivially do this with a combinator, although it will have a one tick delay.

Count hand contents however cannot be emulated with combinators, so it's more important.
Actually, it requires a non-trivial amount of combinators, as any cable connected to a collector will add the current contents again - so multiple levels of isolation are required (every collector needs to get the sum of all collectors as input which is not connected directly to another connector via the same wire).
It's not clear to me exactly what you're trying to do,
But if you want to have a bunch of collectors, and ensure that they won't collect any asteroid types that aren't already in any of the collectors, you only need a single combinator:
Screenshot 2024-12-06 153528.png
Screenshot 2024-12-06 153528.png (1.03 MiB) Viewed 139 times
Screenshot 2024-12-06 153533.png
Screenshot 2024-12-06 153533.png (142.27 KiB) Viewed 139 times
Screenshot 2024-12-06 153541.png
Screenshot 2024-12-06 153541.png (567.38 KiB) Viewed 139 times
(In the above, none of the three collectors have any oxide chunks, hence they won't collect any either).