Page 1 of 1

Currently possible to change polution?

Posted: Tue Oct 08, 2013 1:59 am
by midnight109
Dosent seem possible yet, but so far can only think of creating a - pollution value, but dosent seem to work.
Curious if thier is a known way to make a entity absorb or remove pollution so long as it has power and water. I was considering making a Water Filtration system for the Air pollution you could place in areas that would take away some of the pollution passing by

Re: Currently possible to change polution?

Posted: Tue Oct 08, 2013 2:02 am
by midnight109
and I did see the emissions_per_tick = -0.0001 for trees, but looking for something diffrent. It seems it always functions, prob is I want the reductions to stop if the new entity losses key parts such as water or power. Using the plain emissions_per_tick = -0.0001 setup seems I can place it, and it just works, even without bing plugged into the grid

Re: Currently possible to change polution?

Posted: Tue Oct 08, 2013 2:31 am
by FreeER
simple :D , instead of

Code: Select all

--note taken from basic-mining-drill
emissions = 0.15 / 1.5,
simply make it negative. thus

Code: Select all

emissions = -0.15 / 1.5,
Now if you don't have electricity going to the mining drill it will not decrease the pollution. If you did this with a boiler it would need both water and coal to work, etc.

You could also call entity.setactive(false) if you needed to manually prevent it from working (in 0.7.1 this will change to entity.active=false) do note that entity is a reference to an actual entity, not the code you would write.

hmm, just saw that you said
midnight109 wrote:creating a - pollution value, but dosent seem to work.
but I did just test it with the electric mining drill and it did work perfectly, pollution levels started dropping (rather rapidly since the drills are my main polluters, besides boilers and electric furnaces).

Re: Currently possible to change polution?

Posted: Tue Oct 08, 2013 1:49 pm
by ficolas
Can we use emition per tick on any entity or just on trees?

Re: Currently possible to change polution?

Posted: Tue Oct 08, 2013 6:47 pm
by FreeER
ficolas wrote:Can we use emition per tick on any entity or just on trees?
well I tested putting it on mining drills and transport belts (using -1 instead of -0.0001 gives very quick dispersal for that area)...so I'd assume most entities will allow emissions_per_tick

Re: Currently possible to change polution?

Posted: Tue Oct 08, 2013 7:48 pm
by ficolas
FreeER wrote:
ficolas wrote:Can we use emition per tick on any entity or just on trees?
well I tested putting it on mining drills and transport belts (using -1 instead of -0.0001 gives very quick dispersal for that area)...so I'd assume most entities will allow emissions_per_tick
Ya I know about assembling machines mining drills, boilers, trees etc.
But what about... A chest?
I cant try atm thats why I ask :)

Re: Currently possible to change polution?

Posted: Tue Oct 08, 2013 7:52 pm
by kovarex
ficolas wrote:
FreeER wrote:
ficolas wrote:Can we use emition per tick on any entity or just on trees?
well I tested putting it on mining drills and transport belts (using -1 instead of -0.0001 gives very quick dispersal for that area)...so I'd assume most entities will allow emissions_per_tick
Ya I know about assembling machines mining drills, boilers, trees etc.
But what about... A chest?
I cant try atm thats why I ask :)
It will work

Re: Currently possible to change polution?

Posted: Tue Oct 08, 2013 7:58 pm
by FreeER
ficolas wrote:But what about... A chest?
I cant try atm thats why I ask :)
I went ahead and tested both wooden and smart chests for you, both worked so I assume any other containers (or entity) would as well :D

Re: Currently possible to change polution?

Posted: Thu Oct 10, 2013 9:48 am
by slpwnd
There is two things:

1) emissions_per_tick They work for every entity and define a constant value that is emitted / absorbed every tick independent of the entity state.
2) Every energy source has emissions field. That defines emissions based on the energy it is producing. This can be used to make a pollution absorbing machine (that would be powered by the electric energy).

We don't have a concept for an assembling machine like entity that needs water yet. Generator cannot be used either because it doesn't take the energy from the energy source (hence doesn't pollute). But this (entities that need not only electricity but also some liquids) will come in the future.