Page 1 of 1

[0.18.3] Are these the correct values for tile pollution?

Posted: Sat Feb 08, 2020 4:52 am
by Adamo
Hey All,

I noticed that there is a value for tiles to produce/consume pollution that is now mandatory. Wanted to check that these are in fact the correct values, because it seemed kind of weird that water, grass, dirt, and so on would be *producing* pollution. I see here on the wiki:
pollution_absorption_per_second

Type: double
Emissions per second. Use negative value if pollution is consumed/removed instead of produced. Preferred over using ageing.

Mandatory if ageing does not exist.
But grepping the file I see:
data/base/prototypes/tile/tiles.lua:local out_of_map_pollution_absorption = 0.00001
data/base/prototypes/tile/tiles.lua:local water_pollution_absorption = 0.000005
data/base/prototypes/tile/tiles.lua:local grass_pollution_absorption = 0.0000075
data/base/prototypes/tile/tiles.lua:local dirt_pollution_absorption = 0.0000066
data/base/prototypes/tile/tiles.lua:local sand_pollution_absorption = 0.0000058
data/base/prototypes/tile/tiles.lua:local red_desert_pollution_absorption = 0.0000066
data/base/prototypes/tile/tiles.lua: pollution_absorption_per_second = out_of_map_pollution_absorption
data/base/prototypes/tile/tiles.lua: pollution_absorption_per_second = water_pollution_absorption
and so on
This appears to say that all of these tiles produce a slight amount of pollution, rather than consuming it. Am I reading this wrong, or did you intend to have these tiles produce pollution? I figured these tiles would consume a slight amount of pollution, no?

Cheers!

Re: [0.18.3] Are these the correct values for tile pollution?

Posted: Sat Feb 08, 2020 5:01 am
by Honktown
Looks like it's just an error on the wiki:

https://lua-api.factorio.com/latest/Lua ... per_second
emissions_per_second :: double [Read-only]
Amount of pollution emissions per second this tile will absorb.

Re: [0.18.3] Are these the correct values for tile pollution?

Posted: Sat Feb 08, 2020 10:21 pm
by Adamo
I see someone moved this to "not a bug", but according to the words on the wiki and/or the values in the code, it is in fact doing the opposite of what you expected, right? Could someone at least respond to explain which one is correct while moving it to "not a bug"? I have tiles I need to edit.

Re: [0.18.3] Are these the correct values for tile pollution?

Posted: Sun Feb 09, 2020 7:07 am
by Klonan
Adamo wrote: Sat Feb 08, 2020 10:21 pm I see someone moved this to "not a bug", but according to the words on the wiki and/or the values in the code, it is in fact doing the opposite of what you expected, right? Could someone at least respond to explain which one is correct while moving it to "not a bug"? I have tiles I need to edit.
The tiles in the base game are absorbing pollution, which is also what the variable says, "pollution absorption per second".

Re: [0.18.3] Are these the correct values for tile pollution?

Posted: Tue Feb 11, 2020 8:31 pm
by Adamo
Klonan wrote: Sun Feb 09, 2020 7:07 am
The tiles in the base game are absorbing pollution, which is also what the variable says, "pollution absorption per second".
OK, thanks, Klonan. Just an FYI, it looks like the wiki is wrong, then. So maybe not a "bug" but definitely something you all should be aware of.