Page 1 of 1

an idea for fixing auto-connecting power-pole problems

Posted: Tue Jun 13, 2017 4:41 am
by golfmiketango
I recently posted some ideas about this:
Rseding91 wrote:
yblondinca wrote:Now I realize from the above posts that this is definitely related to the fact that there seems to be a connection limit for Electric Poles. My question is why is that limit set as low as 5 and not bumped up to 8 or something? There is probably a good reason for the 5 connection limit but I can see many instances where, 6, 7, or even 8 connections to a pole should not be out of the question. Otherwise you end up in a situation like the one I am in now where I need to rearrange things to make it work. For your average user, this does not seem very intuitive or documented.
Because a number had to be picked and it was 5. Almost nobody notices so it seems like it's just fine as it is.

The technical reason why it's not unlimited:

The connections are stored in a std::array<> of size 5 for improved memory locality allowing them to be accessed without having to do additional memory lookups. The same system inserter filters use and why those are limited to a maximum of 5 as well.
in another forum. But I have an even better idea now. Every non-run-and-place-related practical or aesthetic problem I can think of pertaining to auto-connected power poles could be solved with a single per-pole checkbox, preserved in blueprints, labelled, i.e., "auto-wire copper cable" with these effects:
  • * (default) on: The behavior is as it is now.
    * off: The pole does not auto-connect to anything upon robotic placement or if any adjacent power poles are placed (I think toggling this should not disconnect existing connections, however). In blueprints, any copper wire connections are preserved according to the rules red and green wires use in their interactions with power poles. If I'm guessing correctly, this may be how switches already behave in blueprints, so possibly just some multiple-inheritance abuse is required to make the blueprint part happen without much effort (and then break horribly later :))