Page 1 of 1

[1.1.21] pollution_absorption_per_second cannot be negative.

Posted: Thu Feb 18, 2021 11:07 pm
by adamwong246

Code: Select all

local garbagefillTile = table.deepcopy(data.raw["tile"]["landfill"])

garbagefillTile.name = "garbagefill"
garbagefillTile.tint = {0.85, 0.25, 0.25, 1}
garbagefillTile.pollution_absorption_per_second = -0.0000075

data:extend{
garbagefillTile
}

log(data.raw["tile"]["grass-1"].name)
log(data.raw["tile"]["grass-1"].pollution_absorption_per_second)

log(data.raw["tile"]["garbagefill"].name)
log(data.raw["tile"]["garbagefill"].pollution_absorption_per_second)

Code: Select all

   3.913 Loading mod toxic_waste 0.0.11 (data.lua)
   3.919 Script @__toxic_waste__/garbagefill.lua:58: grass-1
   3.919 Script @__toxic_waste__/garbagefill.lua:59: 7.5e-06
   3.919 Script @__toxic_waste__/garbagefill.lua:61: garbagefill
   3.919 Script @__toxic_waste__/garbagefill.lua:62: -7.5e-06
The docs indicate this should be possible
https://wiki.factorio.com/Prototype/Til ... per_second
Use a negative value if pollution is created instead of removed.
However, I have been unable to make a polluting tile. I fill up vast spaces with garbagefill and speed up the clock, but no pollution happens.

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Posted: Fri Feb 19, 2021 7:37 am
by Bilka
A chunk's pollution is not updated unless it's already polluted (or there are polluting entities). So, if you spawn even just a bit of pollution (/c game.player.surface.pollute({0,0}, 1)), you can observe that the tiles in that chunk produce pollution.

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Posted: Fri Feb 19, 2021 4:55 pm
by adamwong246
Thank you.

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Posted: Mon Feb 22, 2021 10:49 am
by Klonan
So I am gonna call this not a bug for now, since the code is working as was intended

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Posted: Mon Feb 22, 2021 3:32 pm
by adamwong246
yes, this was submitted under a misunderstanding of the pollution system.