ElectricPole supply_area_position

Things that we aren't going to implement
Post Reply
Xorimuth
Filter Inserter
Filter Inserter
Posts: 429
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

ElectricPole supply_area_position

Post by Xorimuth »

For my mod Power Overload I'd like to add an ElectricPole entity that can only attach to machines on one side. Currently a pole's supply area most be a square at its centre, so instead of shifting that, I've been shifting the pole's collision box, graphics, etc. Unfortunately, a collision box must include the (0, 0) point, so at least half of the supply area must be inside the entity. I'd like a 3x3 entity with a single 1x1 supply area, but this is impossible given these limitations.

I'd like to request a way to offset the supply area so that I can put it wherever I like :)

Image

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 1786
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: ElectricPole supply_area_position

Post by boskid »

No.

Depending on where the offset vector would be located, if it would be in the prototype that would mean an electric pole would also need a direction to make it possible to rotate electric pole in a blueprint as otherwise rotating a blueprint would become useless with those entitites. If this would be inside of the entity itself, it would be a memory cost for every electric pole. Its relatively fine to add extra 8 bytes to ElectricPole but the issue would be because when building an entity that connects to electric pole it must perform an entity search for the electric pole and it must find all electric poles it is in range of as otherwise it would be a desync condition (when loading, those connections are recreated by entity searches from the electric pole point of view). That means there would be a limit of the maximum offset in both axes as that offset would need to expand the area of every entity searches for electric poles.

Also this in the area of electric poles that was cleaned up a lot for expansion so the code has diverged a little bit too much for me to implement this feature twice (once for 1.1 and once for 1.2)

Post Reply

Return to “Won't implement”