Water is not infinite


Makes water a finite resource. Uses a depth map: each water tile has a depth based on its type. Pumps drain lakes; depleted tiles become land. Refill with outfall pipes and rain

Tweaks
26 days ago
2.0
1.18K
Environment Fluids Power

g Did I miss license or it doesn't exist in zip file?

a month ago

Did I miss license or it doesn't exist in zip file?

a month ago

There is no license file yet. I'll add it

a month ago

I'd appreciate dual-license because of https://opensource.org/blog/public-domain-is-not-open-source etc.

a month ago

Thanks for pointing this out! I changed the license.

By the way, if you plan to modify it, we can do it collaboratively. Feel free to suggest options - I am open to different approaches

a month ago
(updated a month ago)

By the way, if you plan to modify it, we can do it collaboratively.

Sure, I could optimize first (which will be with drastic changes) with a repository on Github, and then I'll see what I could do next.

However, I got used to making it separately, for instance: https://mods.factorio.com/mod/m-rpg_items (although it wasn't collaborative)

a month ago

I'm thinking about reworking the mod overall, switching from tile-based simulation to water-body-based calculations. I will probably rewrite most of it from scratch, keeping only the Factorio entity logic (offshore pumps, outfalls) and maybe part of the tile transition code.

But it would probably be a different mod, Water is Not Infinite 2.0 :)

For now, I just want to fix some bugs and make minor improvements to this mod

a month ago
(updated a month ago)

What about making it with precalculation?
For example, the mod changes tiles like stages after X interactions, although it might require to change pump as a prototype to use it effectively as a workaround or it might require new API features with pumps.

a month ago

If I understood your idea correctly, then changing tiles is not the bottleneck. The bottleneck is the constant recalculation of water levels and the BFS from pumps in memory. It is not related to the Factorio API at all, just Lua array processing.

If we run the calculations less often, water will not have enough time to equalize between tiles, and pumps will drain only the local area and then stop

a month ago
(updated a month ago)

Also, there are so many ways and cases to the point it's easier to draw, than to write it down...

a month ago

Is it less water when a player places landfill over it?

a month ago

No, landfill does not remove water. It displaces it to neighboring cells

a month ago

Interesting, I'll check in game more, and then I might invite you to a server to discuss more there.

New response