Basically, yeah. You could do that with just e.assembler
instead of e.assembler ~= nil
as nil
evaluates to false
, whereas an assembler entity (which is actually a table with some userdata magic) evaluates to true
.
Also while I'm here, here's a bit of an update on the next version (with this fix): I finally got around to implementing some of my ideas for optimization, which worked out really well - in some scenarios, the new code runs in about 1% of the time the old did. This necessitated a couple changes to how the combinators behave though, which means this is probably gonna end up being a breaking update, despite my best efforts to write a decent migration.
The issues I can't really fix are blueprints, which will almost certainly not work between the versions, and the signal selection logic being slightly different with multiple signals of the same strength, which could potentially break existing setups that relied on the old behavior.
I decided to wait with the update until the weekend, when I'll have some time to think about it again, so expect to see a release then. I might also release an extra 0.14 version with just this fix for people who might want to put off the update to avoid breaking their setups... We'll see how it goes.