[MOD 0.18.X] Pollution detector
Re: [MOD 0.13.X] Pollution detector
Mod has been updated. Just download it from here or via mod portal.
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.13.X] Pollution detector
I' ve got an error about pollution detector entity: Error while loading pollution detector(constant combinator) No such node(sprite). Can anyone help me with this? I'm using newest STABLE release downloaded from here...
Re: [MOD 0.14.X] Pollution detector
Updated to work with Version 0.14.
It's working fine for me. Could you upload the savegame, so I can check if it's something wrong there?Pagan_PL wrote:I' ve got an error about pollution detector entity: Error while loading pollution detector(constant combinator) No such node(sprite). Can anyone help me with this? I'm using newest STABLE release downloaded from here...
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.15.X] Pollution detector
Mod has been updated for Factorio 0.15.X. Just download it from here or via mod portal.
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.15.X] Pollution detector
Cool mod. I updated your control file to scale better with more detectors
The biggest change is only a set amount of detectors are processed each pass.
The biggest change is only a set amount of detectors are processed each pass.
Code: Select all
local DETECTORS_TO_PROCESS = 30
local pollutionDetectors
local pollutionRuntime
local function onConfigChange()
if not pollutionRuntime then
if not global.pollutionRuntime then
global.pollutionRuntime = {}
end
pollutionRuntime = global.pollutionRuntime
end
if (pollutionRuntime.version ~= 1) then
pollutionRuntime.processEvent = (math.ceil(game.tick / 60) + 1) * 60
print(pollutionRuntime.processEvent)
pollutionRuntime.queueIndex = 1
pollutionRuntime.virtualSignalParam = {
parameters={
{
index=1,
signal={
type="item",
name="pollution"
},
count=-1
}
}
}
pollutionRuntime.version = 1
end
end
local function onInit()
global.pollutionDetectors = {}
global.pollutionRuntime = {}
pollutionDetectors = global.pollutionDetectors
pollutionRuntime = global.pollutionRuntime
onConfigChange()
end
local function onLoad()
pollutionDetectors = global.pollutionDetectors
pollutionRuntime = global.pollutionRuntime
end
-- Logic
local function addPDToTable(event)
local entity = event.created_entity
if (entity.name == "pollution-detector") then
entity.operable = false
pollutionDetectors[#pollutionDetectors+1] = entity
end
end
local function removePollutionDetector(event)
local entity = event.entity
if (entity.name == "pollution-detector") then
for i = #pollutionDetectors,1,-1 do
local pd = pollutionDetectors[i]
if pd.valid then
if (entity == pd) then
table.remove(pollutionDetectors, i)
break
end
else
table.remove(pollutionDetectors, i)
end
end
end
end
local function setPollutionValue(entity)
if (entity.valid) then
local pollutionSignal = pollutionRuntime.virtualSignalParam
pollutionSignal.parameters[1].count = math.floor(entity.surface.get_pollution(entity.position))
entity.get_control_behavior().parameters = pollutionSignal
end
end
local function onTick(event)
local tick = event.tick
if (pollutionRuntime.processEvent == tick) then
pollutionRuntime.processEvent = pollutionRuntime.processEvent + 60
local startIndex = pollutionRuntime.queueIndex
local endIndex = math.min(#pollutionDetectors, startIndex + DETECTORS_TO_PROCESS)
for i = startIndex, endIndex do
setPollutionValue(pollutionDetectors[i])
end
if (endIndex == #pollutionDetectors) then
pollutionRuntime.queueIndex = 1
else
pollutionRuntime.queueIndex = endIndex
end
end
end
-- Events
script.on_init(onInit)
script.on_load(onLoad)
script.on_configuration_changed(onConfigChange)
script.on_event({defines.events.on_built_entity,
defines.events.on_robot_built_entity}, addPDToTable)
script.on_event({defines.events.on_player_mined_entity,
defines.events.on_robot_mined_entity,
defines.events.on_entity_died}, removePollutionDetector)
script.on_event(defines.events.on_tick, onTick)
Re: [MOD 0.15.X] Pollution detector
My megabase heavily relies on this to control the air filters.
Sadly its performance wasn't up to the task, so i rewrote it from scratch. Update:
added version for Factorio 0.16 with hr graphics
Sadly its performance wasn't up to the task, so i rewrote it from scratch. Update:
added version for Factorio 0.16 with hr graphics
My Mods: mods.factorio.com
Re: [MOD 0.15.X] Pollution detector
Thank you, Optera,
I'll take 0.4.0 as the current version. I'll give you credit aswell
Greetings,
Schorty
I'll take 0.4.0 as the current version. I'll give you credit aswell
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.15.X] Pollution detector
Good to see you still around Schorty.
Sidenote to my forks:
I replaced the pollution icon with a pollution signal a while ago and never bothered adding a migration script, so all circuit logic using the pollution item will have to be reset.
Sidenote to my forks:
I replaced the pollution icon with a pollution signal a while ago and never bothered adding a migration script, so all circuit logic using the pollution item will have to be reset.
My Mods: mods.factorio.com
-
- Filter Inserter
- Posts: 454
- Joined: Tue Jun 20, 2017 1:56 am
- Contact:
Re: [MOD 0.15.X] Pollution detector
i like the air filter mod usually i go around the base manually adding the building where EvoGui shows lots of pollution (for fine tuning) plus the main map. but now that my base gets low on power, i can try using the detector to let me know when somewhere reaches a certain pollution level, and hopefully to be able to switch on (and off) the filters to save power.
(im almost ready to set up the reactor - but i made a silly mistake here)
viewtopic.php?f=208&t=56192#p347182 (picture below this post)
also Optera greetings to you
i like your Deep Mine, as it gave me a way to get new madclown ores that did not appear on the map, after adding it to a widely-explored existing game. i couldnt find a forum page for your mod so hi here.
a possible fix for the above issue could be here though, https://mods.factorio.com/mod/DeleteEmp ... 1024d77364 but still waiting to see.
(im almost ready to set up the reactor - but i made a silly mistake here)
viewtopic.php?f=208&t=56192#p347182 (picture below this post)
also Optera greetings to you
i like your Deep Mine, as it gave me a way to get new madclown ores that did not appear on the map, after adding it to a widely-explored existing game. i couldnt find a forum page for your mod so hi here.
a possible fix for the above issue could be here though, https://mods.factorio.com/mod/DeleteEmp ... 1024d77364 but still waiting to see.
(also me from the mod portal - im not dustine lol) = https://mods.factorio.com/mods/Dustine/ ... ssion/9108
my 1st Mod Idea viewtopic.php?f=33&t=50256
my 1st Mod Idea viewtopic.php?f=33&t=50256
Re: [MOD 0.17.X] Pollution detector
Updated the mod to work with 0.17
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.17.X] Pollution detector
With 0.17.12 you will have to multiply pollution by 60 to get appropriate values.
My Mods: mods.factorio.com
Re: [MOD 0.17.X] Pollution detector
Thanks for the heads up. Will update the mod soon.
edit: Technically it outputs the appropriate pollution amount. It may or may not break previous designs, because the ratio changed, but it reads the correct numbers. I guess I'll keep the mod as it is.
edit: Technically it outputs the appropriate pollution amount. It may or may not break previous designs, because the ratio changed, but it reads the correct numbers. I guess I'll keep the mod as it is.
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.17.X] Pollution detector
I think we loose too much granularity moving the value range where air filters should be turned on to keep pollution in check from 200-300 down to 2-5.
My Mods: mods.factorio.com
Re: [MOD 0.17.X] Pollution detector
This is a fair point. Pollution is given as a floating point value, so multiplying might actually be a helpful change, because combinators wont accept floating point values..
I'll get to changing the mod right away
I'll get to changing the mod right away
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.17.X] Pollution detector
Mod has been updated. As stated befor, I multiplied the returned value by 60, because values have been divided by 60 as of 0.17.13 (See https://www.factorio.com/blog/post/fff-286).
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.18.X] Pollution detector
Updated for Version 0.18
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.18.X] Pollution detector
Maybe 1.1 please?
Krastorio 2 need your mod!
I got some updates for 1.1 support + NanoBots support. Please upload new version or upgrade me as contributor in mod portal please (I am).
Krastorio 2 need your mod!
I got some updates for 1.1 support + NanoBots support. Please upload new version or upgrade me as contributor in mod portal please (I am).
- Attachments
-
- pollution-detector.zip
- (138.01 KiB) Downloaded 125 times
Re: [MOD 0.18.X] Pollution detector
Sorry, I don't have the time at the moment. If someone else updates the mod, I'll place it in the mod portal. Sorry guys! =(
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
With this, you are able to use the pollution levels in your circuit network: Pollution detector
Re: [MOD 0.18.X] Pollution detector
Mr Shorty, I posted upper updated version. Or you may set me as contributor in mod portal
Re: [MOD 0.18.X] Pollution detector
That mod crashes as it's not named properly in the json file.
The file should be called pollution-detector_0.1.0.zip, and the directory inside it should be named the same (without .zip). Could you not post this as a mod on the mod portal, with a note to deprecate if the original author updates ?
The file should be called pollution-detector_0.1.0.zip, and the directory inside it should be named the same (without .zip). Could you not post this as a mod on the mod portal, with a note to deprecate if the original author updates ?