An event for when a surface's pollutant type is changed
Posted: Mon Aug 24, 2026 7:31 am
Now that you can set an override_pollution_type, mods that handle pollution in special ways might need to be aware of when it changes.
I specifically need it because I keep track specific entities and whether or not their chunk exceeds their working pollution range. The loop for this is pretty simple, but I realized I didn't actually support alternative pollutant types.
To fix this, I added a placement-time check for if the surface's pollutant matches the one defined on the working range. This gets written to a flag to skip reading the pollution value in my on_tick and instead always treat it as 0. I'd rather not start checking the pollutant type within that same on_tick if I can help it.
I specifically need it because I keep track specific entities and whether or not their chunk exceeds their working pollution range. The loop for this is pretty simple, but I realized I didn't actually support alternative pollutant types.
To fix this, I added a placement-time check for if the surface's pollutant matches the one defined on the working range. This gets written to a flag to skip reading the pollution value in my on_tick and instead always treat it as 0. I'd rather not start checking the pollutant type within that same on_tick if I can help it.