Page 1 of 1

I can't remove pollution

Posted: Sun Jul 23, 2017 3:40 am
by andyfth
I tried this command:

/c local surface = game.player.surface; for coord in surface.get_chunks() do surface.pollute({coord.x * 32, coord.y * 32}, -10000000) end

But when I open map and click on red button, pollution cloud still shows.
F4 - pollution chunks, all my base is still polluted.

I just can't remove pollution.... .

Re: I can't remove pollution

Posted: Sun Jul 23, 2017 6:31 am
by Hellatze
andyfth wrote:I tried this command:

/c local surface = game.player.surface; for coord in surface.get_chunks() do surface.pollute({coord.x * 32, coord.y * 32}, -10000000) end

But when I open map and click on red button, pollution cloud still shows.
F4 - pollution chunks, all my base is still polluted.

I just can't remove pollution.... .
pollution generated by tick. not by single action.

Re: I can't remove pollution

Posted: Sun Jul 23, 2017 5:36 pm
by Qon
andyfth wrote: /c local surface = game.player.surface; for coord in surface.get_chunks() do surface.pollute({coord.x * 32, coord.y * 32}, -10000000) end

But when I open map and click on red button, pollution cloud still shows.
F4 - pollution chunks, all my base is still polluted.
Works for me. Can you show us a screenshot taken immediatly after running the command, in the map view with pollution?

Re: I can't remove pollution

Posted: Tue Jul 25, 2017 4:00 am
by andyfth
Attachment.
pollution.jpg
pollution.jpg (326.19 KiB) Viewed 3446 times

Re: I can't remove pollution

Posted: Tue Jul 25, 2017 10:15 am
by Qon
Yeah that is weird. Seems like a bug. Report it.

I did copy and execute that exact command from your post and there's no problem with it on my end.

Re: I can't remove pollution

Posted: Tue Jul 25, 2017 11:17 am
by andyfth
I solved it.

1. I disabled pollution.
2. Then I tried to remove pollution - didn't work. I come here.
3. I enabled pollution again. Removed pollution - this time it worked.

It seems that spread of pollution has to be enabled, to be able to remove it.

Re: I can't remove pollution

Posted: Tue Jul 25, 2017 11:25 am
by Qon
andyfth wrote:I solved it. It seems that spread of pollution has to be enabled, to be able to remove it.
Ok not sure if it's a bug or not any more. :D
I understand now why it happens and why it could be considered expected behaviour by someone. But I think the command should work anyways, since turning pollution off doesn't remove pollution. So all turning pollution off means is to stop everything from changing pollution values. I would expect it to turn pollution simulation off, which would include removing it.
I still think you should report it as a bug.