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
"THE BEER-WARE LICENSE" (Revision 42):
Daniel "Schorty" Schlenger wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
Long description
Contents:
Adds a sensor for pollution for usage in circuit networks
Adds technology for pollution detector
This mod is intended to use for turning on and off some factories depending on pollution levels in the chunk where the detector is placed.
(current)
- Multiplied the returned pollution value by 60 to account for the recent changes in pollution values. See https://www.factorio.com/blog/post/fff-286 under "Wednesday"
- Added technology descriptions
0.2.1
- Performance update (Thanks to optera for pointing this out). Pollution detector now updates once per second/Every 60 ticks
0.2.0
- Updated to fit modding changes made in Patch 0.13.0
0.1.2
- Updated to fit modding changes made in Patch 0.12.11
0.1.1
- Fixed a bug, that prevented pollution detectors from working after loading a saved game (reported by Zeeth_Kyrah)
0.1.0
- Added the basic contents of the mod (Entity, Technology, Items)
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;
Re: [MOD 0.12.X] Pollution detector
Posted: Sun Mar 06, 2016 3:07 pm
by daniel34
ares0027 wrote:not working right now;
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.
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!