Here's a screenshot of my bots in action putting down the exact amount of landfill needed for a 480 MW reactor: https://imgur.com/cXi1B7w
The mod can be found here: https://mods.factorio.com/mod/LandfillEverything
As this is my first mod (and first bits of lua code) I'm very eager for feedback on this. I hope someone else finds it as useful as I have.
I put together a description as well, I'll repeat that here:
As 0.17 brings us the possibility for landfill in blueprints, I set out to solve the remaining issue - how to get that landfill into your existing blueprints?
I made a small mod that parses a blueprint and put landfill tiles under every entity in your blueprint, but ONLY where needed to build your blueprint.
Usage: The mod adds a small button in your top right corner. Simply take a blueprint in your hand and click it to convert your blueprint. Then just shift-click where you want your blueprint and sit back and watch your robots fill up the lake for you!
This can be used for every blueprint you want near or in a lake, but it's extra useful when putting down nuclear reactors that often require precise placement of landfill. I've tested this with a gigantic 2.4 GW blueprint without a problem.
The new copy function is a temporary blueprint, so the mod works on those too.
I haven't tested on modded entities but as long as they have a proper selection box that match the footprint of the entity they should work fine. Let me know otherwise.
WARNING: This permanently alters the blueprint *in your hand*. Your library is unaffected, but if you modify a blueprint in your inventory it will stay modified.
WARNING 2: This also removes any existing tiles in your blueprint - concrete, bricks and so on. This should not be a problem since if you take the blueprint from your library the original will still have concrete - you can put down the landfill and then take the original from your library again and stamp down the blueprint *with* concrete.
WARNING 3: This is my first program in lua and it's my first factorio mod - I will gladly accept suggestions for improvements, both functionality and the code. This is the first alpha release, provided without warranty!
This mod builds upon the shoulders of giants: The support for curved rail is straight up nicked from Blueprint Footprint by MostlyNumbers, an older mod that did almost the same thing but slightly different and hasn't been updated. My algorithm for regular entities is my own, though. I also got tips on how to handle blueprints from Foreman by Choumiko.
Known issues: This probably breaks if landfill isn't researched