fix redundant pollution-triggered activity
This change fixes old very annoying problem of abnormal biters activity when pollution cloud doesn't touch nests. Rampant should treat pollution value below min_diffuse_value as not-diffusable pollution, because it will never spread into nest chunk -> biters can sleep well.
P.S. Problem is caused by hidden factorio engine behavior of very slow pollution absorption when pollution units value in chunk is below min_diffuse_value and there are no active pollution eaters in chunk (trees, nests, filters). I described it in Rampant Industry mod portal thread. For Rampant this problem manifestates in more dramatic way, because pollution units value in adjacent chunk reduces to min_diffuse value very fast (diffusion and immediate absorption), but then non-zero minimal pollution stays in that adjacent chunk for dozens of minutes causing a lot of biters activities without real reason.
Best way is to replace 12.5 by some constant generated every game load / init: Safe_Adjacent_PU = game.MapSettings.pollution.min_to_diffuse - (game.MapSettings.pollution.diffusion_ratio * 3)
And the same replacement will be perfect in RampantIndustry filter logics.
https://lua-api.factorio.com/latest/Concepts.html#PollutionMapSettings
Hm, github automatically adds second commit to pull request. Second commit is to address issue https://mods.factorio.com/mod/Rampant/discussion/62cffec331bf5cf7d592b14c
both of these fixes should already be on the dev branch.
if you separate out the sound change I would be happy to include it.
I meant that the sound change be separate to allow for merging just the sound change. Otherwise the other two changes are already on the dev branch. https://github.com/veden/Rampant/blob/dev/prototypes/SwarmUtils.lua#L589
https://github.com/veden/Rampant/blob/dev/Upgrade.lua#L620 https://github.com/veden/Rampant/blob/dev/libs/ChunkPropertyUtils.lua#L629
This code has been merged into the dev branch, thank you for the contribution.