Ecology Mod

Ecology Mod

59k Downloads

Feature: Conditional pollution

tomelfring opened this issue ยท 5 comments

commented

I think it would be nice to have something like conditional pollution. Take for example the Immersive Engineering diesel generator. I only want it to pollute the environment when it's actually running, when it's turned of it shouldn't pollute.

This might be a bit difficult with the 1 minute interval check if the machine is just turned off at that moment.

commented

Hello, @thommy101!

This is a really important feature but it's probably far more complicated than you think because almost every mod has its own TileEntity working behaviors. For one TileEntities you have to check variables, for others invoke methods or even check external conditions.

There are a few ways to define a conditional polluting behavior so far: implement IPollutionEmitter from the API or implement IHasWork(or provide a corresponding capability) from BuildCraft.

See WorldProccesingThread#calculateChunkPollution and PollutionUtils#isTEWorking know how it's working at the moment.

But I know that this is not enough. At the moment I'm thinking about the usage of IMC function(TileEntity -> PollutionData/String(parsable to the PollutionData)) sending, but I don't think much mods will use EcologyMod ways to define a custom pollution behavior anyway.

So, probably the handlers for other mods(at least for the most popular ones) have to be written eventually. May be even in the form of an add-on for the EcologyMod.

And I've seen you are a modder. If you have any ideas, please, write about them here.

commented

I might have some ideas. I'll see if I can write something down to test it :)

commented

OK. I appreciate your support. ๐Ÿ˜Š

commented

Is your mod at the Moment integrating Support for any machines or just for some? Which mods do you Support for Pollution atm? Is Mekanism supported? Is Pollution only created when something is "burned" or also when used energy? (Electric smelters will pollute, as they create dirt)

commented

Hello, @D3nnis3n! At the moment the mod is providing support to tile entities listed in TEPollutionConfig.json. Tiles from this list makes pollution either if they work and have IHasWork interface from buildcraft implemented or every minute, when they are standing in a world. But now I'm working on an addon to EcologyMod, which will make polluting tile entities from other mods emit pollution only when they are working.
And you also can help me by adding new tiles from mods to TEPollutionConfig.json .