[MOD 0.17.X] Pollution detector

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

[MOD 0.17.X] Pollution detector

Post by Schorty » Sun Aug 16, 2015 6:05 pm

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.5.1
Release: 2015-08-16
Tested-With-Factorio-Version: 0.17.14 (Steam/Zip-Archive)
Category: Item
Tags: sensor, pollution, circuit, network
Download-Url: Download
License
Long description
Pictures
Changelog
Last edited by Schorty on Fri Mar 15, 2019 9:27 pm, edited 14 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 » Wed Aug 19, 2015 1:50 pm

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: 179
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty » Wed Aug 19, 2015 1:53 pm

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: 179
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty » Wed Aug 19, 2015 4:09 pm

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 » Thu Aug 20, 2015 11:40 pm

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 » Sun Sep 06, 2015 5:40 am

@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: 179
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty » Sun Sep 06, 2015 9:37 am

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: 53
Joined: Thu Dec 04, 2014 10:04 pm
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by mrtux » Sat Dec 26, 2015 2:31 pm

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: 95
Joined: Fri Nov 20, 2015 6:30 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Dr. Walrus » Wed Dec 30, 2015 6:55 pm

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
Visit my profile on mods.factorio to see some unique, off the wall mods: Mod page for madmaster5000 (me)

Older mods:
Pressure Plates

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

Re: [MOD 0.12.X] Pollution detector

Post by Alexs » Mon Jan 25, 2016 2:32 pm

@ dr.walrus - thx

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

Re: [MOD 0.12.X] Pollution detector

Post by miturion » Tue Feb 02, 2016 7:49 pm

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

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

Re: [MOD 0.12.X] Pollution detector

Post by ares0027 » Sun Mar 06, 2016 3:58 am

not working right now;

Image

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

Re: [MOD 0.12.X] Pollution detector

Post by daniel34 » Sun Mar 06, 2016 3:07 pm

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

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

Re: [MOD 0.12.X] Pollution detector

Post by Schorty » Sun Mar 06, 2016 3:50 pm

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: 179
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.12.X] Pollution detector

Post by Schorty » Sun Mar 06, 2016 4:53 pm

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 » Tue Mar 15, 2016 2:09 pm

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: 2757
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Bug: pollution detector

Post by daniel34 » Tue Mar 15, 2016 2:12 pm

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.

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

Re: [MOD 0.13.X] Pollution detector

Post by Schorty » Tue Jun 28, 2016 9:16 am

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: 2074
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13.X] Pollution detector

Post by Optera » Tue Jul 05, 2016 11:35 am

Having detectors all over the base seems to be very taxing on my game.
20160704172549_1.jpg
20160704172549_1.jpg (1.09 MiB) Viewed 15676 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: 179
Joined: Tue Aug 12, 2014 10:29 am
Contact:

Re: [MOD 0.13.X] Pollution detector

Post by Schorty » Tue Jul 05, 2016 4:35 pm

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”

Who is online

Users browsing this forum: No registered users