From d1d88b38aab1c669a50aed159d5faca8d1386bab Mon Sep 17 00:00:00 2001 From: Alexander <95149904+garrotte13@users.noreply.github.com> Date: Thu, 24 Nov 2022 13:17:18 +0300 Subject: [PATCH] fix redundant pollution-triggered activity --- libs/ChunkPropertyUtils.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/ChunkPropertyUtils.lua b/libs/ChunkPropertyUtils.lua index 2474c1a..0394c75 100644 --- a/libs/ChunkPropertyUtils.lua +++ b/libs/ChunkPropertyUtils.lua @@ -628,20 +628,20 @@ function chunkPropertyUtils.processNestActiveness(map, chunk) local position = {x=0,y=0} position.x = x + 32 position.y = y - if (surface.get_pollution(position) > 0) then + if (surface.get_pollution(position) > 12.5) then chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base) else position.x = x - 32 - if (surface.get_pollution(position) > 0) then + if (surface.get_pollution(position) > 12.5) then chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base) else position.x = x position.y = y - 32 - if (surface.get_pollution(position) > 0) then + if (surface.get_pollution(position) > 12.5) then chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base) else position.y = y + 32 - if (surface.get_pollution(position) > 0) then + if (surface.get_pollution(position) > 12.5) then chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base) else chunkPropertyUtils.setNestActiveness(map, chunk, activeness - 2, base)