Filter Combinator


Provides a filter combinator, which lets you filter any number of signals from the input. Does not alter the signal level and is valid for every signal level. Implemented in terms of circuitry rather than on_tick for performance. 3 ticks of delay between input and output. Compatible with Space Exploration.

Utilities
a month ago
1.1 - 2.0
1.67K
Circuit network

b [Fixed] Minor Graphic Glitch Blue Light on Combnator

8 months ago
(updated 8 months ago)

Great mod by the way, and thanks for your efforts improving on the original & ensuring compatibility with SE.

I have a possible bug/minor graphic display issue. I found this as I'm using the mod Compact circuits. I've attached a screen shot at the following URL: https://imgur.com/h60JfOk.

When you place the Filter Combinator, it places an odd looking glowing blue light on the combinator. The blue light doesn't change its orientation when you rotate the combinator. All fine, just odd - but when you place the Filter Combinator in a compact circuit and enable packed mode in that mod, the blue light shows through onto the landscape - sometimes withing the boundary of the compact circuit sometimes outside it. Deleting the compact circuit and/or combinator after this, doesn't remove the blue light it's stuck on the landscape, and I can't get rid of it.

Is there something I can do to disable this blue light on the Filter Combinator, I'm not sure where it's coming from, or what its purpose is. I had a look through the code but didn't get too far. It's really a minor thing, but quite annoying as you can't get rid of the graphic glitch after it's created.

If there's something I can do on my end to fix this, happy to do that too. I appreciate this might ultimately be a compact circuit issue, but thought I'd ask here as the blue light is certainly on the Filter Combinator.

Either way, thanks again for your hard work modding Factorio!

Edit: Ok, I see the blue light in question, is actually a power/active light, it turns off if you turn off the combinator - seems to be inherited from the Constant Combinator. Tho the Constant Combinator works fine, not leaving away the blue light when they're removed. Also, of note in the constant combinator, the blue light rotates with the combinator (it stays fixed with the filter one).

7 months ago

It is actually a bit more than than. There is a bug (well, technically a shortcoming) in CC that is addressed here: https://github.com/Telkine2018/compaktcircuit/pull/17

The problem is that the filter combinator does not register all its entities with CC but only the "main" entity (and maintains the hidden circuits separately). So when a packed CC is deleted, it destroys all the entities it knows about (the packed filter combinator) but not the hidden ones (because it does not know about them). And it does not send the raise_destroy event which would allow the filter combinator to react on it. Which is ok, because even if it did, the filter combinator has not registered an event handler for it. ;-)

To fix this, either

  • cc has to apply the PR above and then the filter combinator needs to react on the raised_destroy event
    OR
  • the filter combinator needs to replace all its entities (including the hidden ones) with -packed variants and register them with cc so when a CC is destroyed, all combinators get deleted

but those are all challenges for the filter combinator. The good news is that I use them pretty extensively with CC so I will spend some time on the weekend to look through the code and see what needs to be done to get this fixed. However, given how long my previous PR is already sitting, I might end up use a "private" variant.

7 months ago

I would really much rather not register every single entity with another mod, especially seeing it would add some complication and overhead for no real change. The entities are on the same surface anyway and they are already invisible to the player. It would just be an additional place for me to write and check things.
The mod will act on other mods destroying stuff via script in a future update.

7 months ago

Makes sense. I also sent a PR to do a cosmetic fix to get rid of the blue lights (and the flashing double alert icons).

7 months ago

Double alert icons? None of the hidden entities should have any. At least I never saw any. The only way that might happen is if the filter combinator is within a compact circuits entity, and then the power goes out. Which would possibly lead to two "out of power" icons that are flashing, due to the fact that both entities use power and don't have any. I have fixed that for a future version.

7 months ago

I saw the fix, thank you for that. I might not have been clear. The "packed" version of the filter combinator is on the same surface as the compakt circuit, so if the cc does not have power, none of the entities within it have no power and then the fc flashes a "no power" icon as well as the cc.

New response