Remote interfaces allow packed custom combinators to be nil, but wires going past them were deleted:
Basically this:
Turned into:
Because pushbuttons don't have a packed representation in this PR.
Creating an empty constant combinator, instead of returning nil is an option, but an unintuitive one (given that otherwise nil values work) and also just a horrible hotfix.
This PR adds a new rewiring system, to connect things that have non-nil packed representation with an equivalent (yet different and simpler than the unpacked version) wire network.
In essence, the setup from above will turn into:
And something more complex like this:
Will be packed into something like:
(probably with different entities being chosen to be connection origins)
To be clear, none of this will be visible to the user, because unpacked representation is restored from a blueprint.
I've wired things manually to make these screenshots, just as a demo.
Since the wire networks are already computed, it was trivial to also warn the user when something is not connected to processor IO polls:
(I unchecked and immediately checked the "Packed mode" field to get these messages)
[6] tells me about a combinator I forgot to wire for the previous screenshots
[7] tells me that the red network is no longer connected to the IO polls (since I removed it)
[8] tells me that the green network (that was connected to the red network) is also no longer connected now
The current warning system is very rudimentary, so I didn't even bother displaying combinators' translated names.
To improve next:
Actually, the green network in the screenshot above was never connected to the IO polls through the red wire. But to check for that, we need to properly walk the networks Input=>Output, and then Output=>Input;
Nested processors are treated as black boxes, so they can't be optimized (based on parent processor's connections) and every nested IO poll is treated as connected to every other (of the same nested processor);
Some kind of in-game visual to display for the entities that are not connected, instead of chat messages?
This system also allows us to stop replacing many default entities (like power polls) with constant combinators.
But I don't want to touch that until a better system for default entities (similar to remote_name_map) is implemented...
Remote interfaces allow packed custom combinators to be
nil
, but wires going past them were deleted:Basically this: Turned into: Because pushbuttons don't have a packed representation in this PR.
Creating an empty constant combinator, instead of returning
nil
is an option, but an unintuitive one (given that otherwisenil
values work) and also just a horrible hotfix.This PR adds a new rewiring system, to connect things that have non-
nil
packed representation with an equivalent (yet different and simpler than the unpacked version) wire network.In essence, the setup from above will turn into:
And something more complex like this:
Will be packed into something like: (probably with different entities being chosen to be connection origins)
To be clear, none of this will be visible to the user, because unpacked representation is restored from a blueprint. I've wired things manually to make these screenshots, just as a demo.
Since the wire networks are already computed, it was trivial to also warn the user when something is not connected to processor IO polls:
(I unchecked and immediately checked the "Packed mode" field to get these messages)
The current warning system is very rudimentary, so I didn't even bother displaying combinators' translated names.
To improve next:
This system also allows us to stop replacing many default entities (like power polls) with constant combinators. But I don't want to touch that until a better system for default entities (similar to
remote_name_map
) is implemented...