Code: Select all
if (event.entity.type == "container") or (event.entity.type == "smart-container") then
local wasteAmount = event.entity.getitemcount("toxic-waste")
if wasteAmount > 0 then
game.pollute(event.entity.position, wasteAmount * 10)
end
end
Any idea for a workaround or is it a bug?