[2.0.12] Asteroid collector "Read content" signal includes content in its hand

Bugs that are actually features.
Post Reply
shouya
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Oct 30, 2024 12:06 am
Contact:

[2.0.12] Asteroid collector "Read content" signal includes content in its hand

Post by shouya »

I want to make the crusher into "Set recipe" mode to automatically crush whatever is available inside an asteroid collector.

For this simple automation, I put an inserter to pull items from the asteroid collector into the crusher; connect a wire between the crusher and the asteroid collector; and set the asteroid collector's mode to "Read content" and the crusher "Set recipe".

However, this sometimes doesn't work reliably. Sometimes when the asteroid collector is seemingly filled with one or two types of asteroid chunks, where the "Read content" signal output seems to include asteroid chunks that are not inside the asteroid collector's inventory. Upon checking I found that the asteroid chunks still in the claw of the collector is also included in the signal. This mechanism can block the automation from working in the expected way because the inserter can only pull items from the collector's inventory.

I can think of two ways to fix it. Either the "Read content" signal should not count an asteroid chunk until it shows up available in the asteroid collector for pulling. Or, adjust the "Set recipe" logic to pick the strongest signal as suggested in viewtopic.php?f=6&t=116694.

User avatar
xargo-sama
Inserter
Inserter
Posts: 36
Joined: Mon Jun 05, 2023 1:04 pm
Contact:

Re: [2.0.12] Asteroid collector "Read content" signal includes content in its hand

Post by xargo-sama »

This is working as intended. While it's not convenient to your use case, I've opted to include the held chunks in the output signal for the sake of "smart platforms" that want to filter asteroids by circuits based on need. The chunk held by the claw is already captured and will eventually be available. If the logic didn't work this way, you would read the current count of asteroids and then randomly, chunks you cannot read in any way would unbuffer and plop out.

In your case, it appears that the issue only arises when your collector is fully backed up. I suggest you do a simple arithmetic combinator [each]+0 -> [A] to sum the contents of the collector and then do enable/disable on A < 30 or however much is needed to not overfill the collector.


Post Reply

Return to “Not a bug”