Page 1 of 1

Rectangular Roboport Zones?

Posted: Tue May 09, 2017 2:45 pm
by SphynxLoL
I have a fairly simple idea for a mod that I was thinking might be a good place to start learning/putting together my first mod. Essentially I wanted to make a roboport that was 2x2 with ONLY a construction zone that is about 6x18 (rotatable). This would be a great way to set up cheaper roboports along a wall to repair/replace any damage to your defenses. I poked around a few mods that dealt with Roboports and it seemed all of them had "squared". Is it possible to have a single rectangle zone? If not, is it possible for a single robotport to have multiple zones? ie 2 or 3 6x6 construction zones linked to a single robotport to make a rectangle.

Re: Rectangular Roboport Zones?

Posted: Tue May 09, 2017 11:47 pm
by DaveMcW
It's not possible with a simple data.lua mod.

You can write a more advanced control.lua mod that listens for on_built events and adds invisible roboports to create the shape you want.

Re: Rectangular Roboport Zones?

Posted: Wed May 10, 2017 7:56 am
by bobingabout
The reason you can't really do that is because the zone is defined as "Diameter", meaning, if you set it to 50, it extends by 5 north, south, each, and west, creating a 100x100 zone.

And that is the extent of your control of the zone.