Page 1 of 3

[MOD 0.18.X] Pollution detector

Posted: Sun Aug 16, 2015 6:05 pm
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

Re: [MOD 0.12.X] Pollution detector

Posted: Wed Aug 19, 2015 1:50 pm
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?

Re: [MOD 0.12.X] Pollution detector

Posted: Wed Aug 19, 2015 1:53 pm
by Schorty
Oh, haven't noticed this. I'll have a look into this. Thanks for the report :)

Re: [MOD 0.12.X] Pollution detector

Posted: Wed Aug 19, 2015 4:09 pm
by Schorty
Aaaaaand its fixed. At least its working for me now. Please let me know if its working for you, aswell :)

Re: [MOD 0.12.X] Pollution detector

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

Re: [MOD 0.12.X] Pollution detector

Posted: Sun Sep 06, 2015 5:40 am
by Devildog
@Schorty, Adding to the mod pack version 0.2.0

Re: [MOD 0.12.X] Pollution detector

Posted: Sun Sep 06, 2015 9:37 am
by Schorty
Yeah, go ahead man. :)

Re: [MOD 0.12.X] Pollution detector

Posted: Sat Dec 26, 2015 2:31 pm
by mrtux
Will there be a release for 0.12.20?

Re: [MOD 0.12.X] Pollution detector

Posted: Wed Dec 30, 2015 6:55 pm
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

Re: [MOD 0.12.X] Pollution detector

Posted: Mon Jan 25, 2016 2:32 pm
by Alexs
@ dr.walrus - thx

Re: [MOD 0.12.X] Pollution detector

Posted: Tue Feb 02, 2016 7:49 pm
by miturion
this is a nice idea. Better than reading red color tones

Re: [MOD 0.12.X] Pollution detector

Posted: Sun Mar 06, 2016 3:58 am
by ares0027
not working right now;

Image

Re: [MOD 0.12.X] Pollution detector

Posted: Sun Mar 06, 2016 3:07 pm
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

Re: [MOD 0.12.X] Pollution detector

Posted: Sun Mar 06, 2016 3:50 pm
by Schorty
Thanks for pointing that out. I've overlooked the last hint on this. Will have a look at the bug!

Re: [MOD 0.12.X] Pollution detector

Posted: Sun Mar 06, 2016 4:53 pm
by Schorty
Mod has been updated. It will work now. Sorry for the inconvinience!

Greetings,
Schorty

Bug: pollution detector

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

Re: Bug: pollution detector

Posted: Tue Mar 15, 2016 2:12 pm
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.

Re: [MOD 0.13.X] Pollution detector

Posted: Tue Jun 28, 2016 9:16 am
by Schorty
This mod has just been updated to match requirements of Factorio 0.13

Just download version 0.2.0!

Re: [MOD 0.13.X] Pollution detector

Posted: Tue Jul 05, 2016 11:35 am
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 25900 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.

Re: [MOD 0.13.X] Pollution detector

Posted: Tue Jul 05, 2016 4:35 pm
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!