[MOD 0.18.X] Pollution detector

Topics and discussion about specific mods
User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

[MOD 0.18.X] Pollution detector

Post by Schorty »

Image

Type: Mod
Name: Pollution detector
Description: Adds a sensor for pollution in the chunk for hooking it up into the circuit network
License: Beer-Ware License
Version: 0.6.0
Release: 2015-08-16
Tested-With-Factorio-Version: 0.18.1 (Steam/Zip-Archive)
Category: Item
Tags: sensor, pollution, circuit, network
Download-Url: Download
License
Long description
Pictures
Changelog
Last edited by Schorty on Fri Jan 24, 2020 11:36 am, edited 15 times in total.
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

Zeeth_Kyrah
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Tue Jan 21, 2014 10:05 pm
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Zeeth_Kyrah »

This is a pretty cool mod. I'm using 0.12.3 with it, and it's working well. I will say I've had a problem: when I'm loading a saved level, the detectors lock up and display a single value instead of a continuous measurement. I have to remove and replace to get them working again, which also means re-adding the signal wire they're connected to. I'm pretty sure it's a simple on-load statement to reset the detector when the level is started and the entities are already placed. Could you take care of that, please?
Planned projects: Energy Crystals Plus, Minor Fluid Handling, Small electric furnaces
(high-energy materials and assembler, fluid void burner and small tank, tiny and slow furnaces with charcoal)

User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty »

Oh, haven't noticed this. I'll have a look into this. Thanks for the report :)
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty »

Aaaaaand its fixed. At least its working for me now. Please let me know if its working for you, aswell :)
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

Zeeth_Kyrah
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Tue Jan 21, 2014 10:05 pm
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Zeeth_Kyrah »

I game the updated version a try today, and it works! Thank you. This is just what I needed to track pollution counts. I combine it with the Nixie Tubes mod to get a continuous readout, and then when pollution is high in a chunk, I have smart inserters put clean filters in the air filter machines near my highest-polluting chunks. Saves time, energy, and the coal I'd otherwise spend recycling filters when I don't need to.

If I weren't using the air filters mod, I'd still want this, so I could do things like disable high energy-cost or high-pollution devices when their pollution reaches certain chunks I want to keep clean.
Planned projects: Energy Crystals Plus, Minor Fluid Handling, Small electric furnaces
(high-energy materials and assembler, fluid void burner and small tank, tiny and slow furnaces with charcoal)

User avatar
Devildog
Fast Inserter
Fast Inserter
Posts: 170
Joined: Tue Aug 19, 2014 8:19 pm
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Devildog »

@Schorty, Adding to the mod pack version 0.2.0
Last edited by Devildog on Fri Sep 11, 2015 7:19 pm, edited 1 time in total.
Image
Check Out Factorio Mod Madness 2.0 Here : http://bit.ly/1afTDl0
Mod Madness ModPack

User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty »

Yeah, go ahead man. :)
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

mrtux
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Thu Dec 04, 2014 10:04 pm
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by mrtux »

Will there be a release for 0.12.20?
If only my thesis could be done in Factorio …

User avatar
Dr. Walrus
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Nov 20, 2015 6:30 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Dr. Walrus »

mrtux wrote:Will there be a release for 0.12.20?
The 12.11 update broke the mod. I got it working by replacing game.on_event with script.on_event in the control.lua file.

This is my control.lua file from the pollution detector mod on my computer that i edited. it seems to work fine for me. If you replace the file that comes with the mod with this one the mod should work.
http://www.mediafire.com/download/xlnsw ... ontrol.lua

Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [MOD 0.12.X] Pollution detector

Post by Alexs »

@ dr.walrus - thx

miturion
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Mon Aug 03, 2015 5:46 pm
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by miturion »

this is a nice idea. Better than reading red color tones

ares0027
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Sun May 04, 2014 6:48 pm
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by ares0027 »

not working right now;

Image

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by daniel34 »

ares0027 wrote:not working right now;

Image
Dr. Walrus wrote:The 12.11 update broke the mod. I got it working by replacing game.on_event with script.on_event in the control.lua file.

This is my control.lua file from the pollution detector mod on my computer that i edited. it seems to work fine for me. If you replace the file that comes with the mod with this one the mod should work.
http://www.mediafire.com/download/xlnsw ... ontrol.lua
quick links: log file | graphical issues | wiki

User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty »

Thanks for pointing that out. I've overlooked the last hint on this. Will have a look at the bug!
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty »

Mod has been updated. It will work now. Sorry for the inconvinience!

Greetings,
Schorty
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

1nf3ct3d
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Mar 15, 2016 2:02 pm
Contact:

Bug: pollution detector

Post by 1nf3ct3d »

It says _ _ pollution-detector_ _/ control.lua6: attempt to index global "game" (a nil value)
when i try to load a game or start a new one

i have to delete bobs mod and c&p the modpack in again so it works again.

any solutions for this?

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Bug: pollution detector

Post by daniel34 »

You have an old version of pollution detector installed, update or delete it:
[MOD 0.12.X] Pollution detector

EDIT: wasn't sure where to move this topic (was in Bob's mods), so just merged it to here.
quick links: log file | graphical issues | wiki

User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.13.X] Pollution detector

Post by Schorty »

This mod has just been updated to match requirements of Factorio 0.13

Just download version 0.2.0!
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13.X] Pollution detector

Post by Optera »

Having detectors all over the base seems to be very taxing on my game.
20160704172549_1.jpg
20160704172549_1.jpg (1.09 MiB) Viewed 24388 times
Reducing the update interval to every 60 ticks made the time drop from ~4.5 to ~0.04

Code: Select all

script.on_event(defines.events.on_tick, function(event)
  ticks = ticks + 1
  if ticks >= 60 then
    ticks = 0
    for i, pollution_detector in ipairs(pollution_detectors) do
	  setPollutionValue(pollution_detector)
	end	
  end
end)
lua isn't really my thing, so there might be better ways to achieve that.

User avatar
Schorty
Fast Inserter
Fast Inserter
Posts: 185
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.13.X] Pollution detector

Post by Schorty »

You are probably right.. Once per Tick isn't really needed. I'll update the mod right away. Thanks for pointing this out!
Tired of not being able to reduce the pollution? Try the Air-Filter-Mod
With this, you are able to use the pollution levels in your circuit network: Pollution detector

Post Reply

Return to “Mods”