Page 1 of 1

Add a parameter to explicitly exclude tree from pollution effects update queue

Posted: Tue Apr 13, 2021 7:22 pm
by MrBurd
As far as I've found, it's not possible to make trees that aren't affected by pollution.
I'm aware of API methods(LuaEntity::tree_stage_index and tree_gray_stage_index) that can change the tree state and tree gray states, but I'd like to avoid repeatedly calling those on potentially thousands of trees every once in a while.
Instead, would it be possible to add a flag (or similar feature) to a modded object using the Tree prototype that excludes it from pollution-induced updates? This would leave it with all the benefits of the Tree prototype without deterioration by pollution.

As with the other topic I've posted, I'd like to make a mod that allows trees to be placed as decorative objects; blueprintable and pollution immune, which is why I'd like to have a feature like this.