[1.1.21] pollution_absorption_per_second cannot be negative.

Bugs that are actually features.
Post Reply
User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

[1.1.21] pollution_absorption_per_second cannot be negative.

Post 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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Post by adamwong246 »

Thank you.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Post by Klonan »

So I am gonna call this not a bug for now, since the code is working as was intended

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: [1.1.21] pollution_absorption_per_second cannot be negative.

Post by adamwong246 »

yes, this was submitted under a misunderstanding of the pollution system.

Post Reply

Return to “Not a bug”