Tree Healing


Slowly undoes pollution damage to trees, if the pollution in their chunk is below the threshold at which they start taking damage. Makes forests pretty again once you stop choking the world in coal fumes.

Tweaks
8 days ago
2.0
1.07K
Environment
Owner:
Pseudonymous
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
1.2.1 (8 days ago)
Factorio version:
2.0
Downloaded by:
1.07K users

Overview

Heals trees' pollution damage if the chunk they're in isn't polluted anymore. Can't give you a more detailed description than the short one, that's it. That's all it does.

How it works

Every 10 ticks (configurable), an operation is performed. What that operation is depends on where the mod is in its cycle.

  • The first operation is to choose a chunk somewhere on Nauvis, and check its pollution level. If the pollution level is below the threshold at which trees start to take damage, the chosen chunk is divided into 4 sub-chunks (configurable) for further processing. If instead the pollution level is above that threshold, the chunk is discarded and the next operation will be a repeat of the first.

The following operations then occur only if the chunk was not discarded.

  • Next, on each operation a sub-chunk is checked for trees. Any that are found are added to a list.
  • Lastly, each operation picks 16 trees (configurable) from the list at random and reduces their pollution damage by one level. These trees are then removed from the list so a different batch is chosen next operation. This continues until every tree in the chunk has been healed by one level and struck from the list.

At this point the cycle begins anew and a fresh chunk is chosen.