Page 1 of 1

[Help]Grouping Tiles and providing access to the power network for things built ontop

Posted: Tue Jan 02, 2024 10:41 pm
by AlmightyCrumpet
Hi,

I'm looking to make my mod more UPS friendly by removing the hidden entity placed on the Tile space to provide the functionality, as you can imagine, having 1 or more entities in each space a tile occupies VERY quickly adds up and has negative effects on the UPS.

Ideally I'd love to be able to have a function that will check the existing tile and it's neighbours grouped and the grouped tiles becomes the coverage. (Something similar to what Exotic Industries does for the Induction Matrix but on a much larger scale)
By Coverage I mean power coverage and for certain tiles Logistic network coverage.
I think it would take a lot of work to get to that result though and in the meantime I'd just like to have it so that the tiles in this group can provide power to anything built on-top of it and have a variable for the group to determine if it is connected to a power source.

My mod:
https://mods.factorio.com/mod/PoweredFloorExtended

I would appreciate any suggestions and help.
I'm a novice to lua but code for my work so given enough time and guidance I think I can make my way through