diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-09-27 02:48:32 +0100 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-09-27 02:48:32 +0100 |
commit | 89d30a5cfcc2d3d5773647350edf913f156062b3 (patch) | |
tree | 778a5bd45aa29980fd6c86a327a37592dc600c5c /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic | |
parent | 2e90f7bac4f033ee49556238f02bcdccb3eca170 (diff) | |
download | GT5-Unofficial-89d30a5cfcc2d3d5773647350edf913f156062b3.tar.gz GT5-Unofficial-89d30a5cfcc2d3d5773647350edf913f156062b3.tar.bz2 GT5-Unofficial-89d30a5cfcc2d3d5773647350edf913f156062b3.zip |
+ Added ability for Pollution Scrubbers to remove pollution if it's disabled. Useful if you disable it after starting, as GT will then ignore it forever in the chunks it's left in.
% Adjusted Melting point of CO2.
% Adjusted the fuel usage on the LRE, I think? (I don't remember)
$ Removed logging from decayable NEI handler.
$ Fixed potential bad handling of fluid assignment to GT++ materials.
$ Fixed incorrect handling of Sulphur Dioxide.
$ Hopefully something here fixes the corruption of all canning recipes. :<
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java index e277b671c6..4795b0d0b9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java @@ -1,6 +1,9 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.V; +import static gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils.mPollution; + +import org.apache.commons.lang3.ArrayUtils; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; @@ -40,6 +43,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi protected boolean mHasPollution = false; protected int SLOT_ROTOR = 4; protected int SLOT_FILTER = 5; + protected static boolean mPollutionEnabled = true; protected boolean mSaveRotor = false; @@ -55,10 +59,12 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB) }); + mPollutionEnabled = PollutionUtils.mPollution(); } public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { super(aName, aTier, 2, aDescription, aTextures, 2, 0, aGUIName, aNEIName); + mPollutionEnabled = PollutionUtils.mPollution(); } /*public GregtechMetaAtmosphericReconditioner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -75,10 +81,9 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi @Override public String[] getDescription() { - boolean highTier = this.mTier >= 7; - + boolean highTier = this.mTier >= 7; - return new String[]{ + String[] A = new String[]{ this.mDescription, highTier ? "Will attempt to remove 1/4 pollution from 8 surrounding chunks" : "", highTier ? "If these chunks are not loaded, they will be ignored" : "", @@ -87,9 +92,19 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi "Can be configured with a soldering iron to change modes", "Low Efficiency: Removes half pollution, Turbine takes 50% dmg", "High Efficiency: Removes full pollution, Turbine takes 100% dmg", - "Turbine Rotor will not break in LE mode", - + "Turbine Rotor will not break in LE mode", }; + if (!mPollutionEnabled) { + String[] B = new String[] { + "===============================================", + "Pollution is disabled, scrubbers will now have a bonus use", + "They are now able to remove ALL lingering pollution as GT ignores it", + "and it will linger forever!", + "===============================================", + }; + A = ArrayUtils.addAll(A, B); + } + return A; } @Override @@ -187,7 +202,19 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi if (aBaseMetaTileEntity.isActive()){ //Do nothing if there is no pollution. - if(this.mHasPollution && mCurrentPollution > 0){ + if(this.mHasPollution && mCurrentPollution > 0){ + + //Only check every 30s. + if (!isIdle && aTick % (20L * 30) == 0L){ + mPollutionEnabled = PollutionUtils.mPollution(); + //Clear out pollution if it's disabled, because I am a nice gal. + if (!mPollution()) { + PollutionUtils.nullifyPollution(this.getBaseMetaTileEntity()); + } + } + + + //Use a Turbine if(hasRotor(stackRotor) && hasAirFilter(stackFilter)){ |