Whenever a biter nest absorbs pollution, I'd like to hook into the event with a reference to the nest and how much pollution was absorbed.
Can that be done?
If not, at a fixed rate I'd like to iterate over all biters nests in tiles that have pollution... with a reference to the tile pollution total and biter nest per iteration. Is that feasible? I'm not sure how to implement this without affecting performance too heavily.
On biter nest absorb pollution... Do
Re: On biter nest absorb pollution... Do
No, there's no such event and there isn't likely to be one as it would add a large constant overhead for minimal gains as pollution absorption happens frequently.reaperrar wrote:Whenever a biter nest absorbs pollution, I'd like to hook into the event with a reference to the nest and how much pollution was absorbed.
Can that be done?
If you want to get ahold of me I'm almost always on Discord.
Re: On biter nest absorb pollution... Do
Cheers.Rseding91 wrote: No, there's no such event and there isn't likely to be one as it would add a large constant overhead for minimal gains as pollution absorption happens frequently.
If anyone is interested...
I ended up finding all nests on game init and also added to my array when they are built.
Every game tick my iteration loop only iterates over a certain number of nests per tick (with the entire iteration deferred over multiple game ticks) and using the delta from last tick per nest to scale my calculations.
It isn't entirely accurate due to the deferring (nabbing the tile pollution at iteration time) but it's close enough.