diff options
| author | Glease <4586901+Glease@users.noreply.github.com> | 2020-10-13 22:26:49 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-13 22:26:49 +0800 |
| commit | 344b00012aca59c4b0372185e41f529baffa5da3 (patch) | |
| tree | 7381f76e13a24e3b5b1669fc5947acb3d15dfbfb | |
| parent | 3ff33adbffd26a70cdcce3162da14c48ed60c668 (diff) | |
| download | GT5-Unofficial-344b00012aca59c4b0372185e41f529baffa5da3.tar.gz GT5-Unofficial-344b00012aca59c4b0372185e41f529baffa5da3.tar.bz2 GT5-Unofficial-344b00012aca59c4b0372185e41f529baffa5da3.zip | |
Make cleanroom workspeed based on height and tier
It is now 225 second per block height. A standard 3x4x3 cleanroom will take 7.5 minute to fire up (down from 8.33 minute). Any wider will not cause it to slowdown. The cleanroom will be overclockable (not perfect).
| -rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 673c2cabaf..6ceebc3877 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -18,8 +18,10 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import static gregtech.api.enums.GT_Values.debugCleanroom; +import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { + private int mHeight = -1; public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -46,17 +48,20 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas "Up to 10 Machine Hull Item & Energy transfer through walls", "Remaining Blocks: Plascrete, 20 min", GT_Values.cleanroomGlass+"% of the Plascrete can be Reinforced Glass (min 20 Plascrete still apply)", - "Consumes 40 EU/t when first turned on and 4 EU/t once at 100% efficiency", + "Consumes 40 EU/t when first turned on and 4 EU/t once at 100% efficiency when not overclocked", "An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV", "2 LV batteries + 1 LV generator or 1 MV generator", + "Time required to reach full efficiency is propotional to the height of empty space within.", "Make sure your Energy Hatch matches!"}; } @Override public boolean checkRecipe(ItemStack aStack) { mEfficiencyIncrease = 100; - mMaxProgresstime = 100; - mEUt = -4; + // use the standard overclock mechanism to determine duration and estimate a maximum consumption + calculateOverclockedNessMulti(40, 45 * Math.min(1, mHeight - 1), 1, getMaxInputVoltage()); + // negate it to trigger the special energy consumption function. divide by 10 to get the actual final consumption. + mEUt /= -10; return true; } @@ -231,6 +236,8 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas float ratio = (((float)mPlascreteCount)/100f)* GT_Values.cleanroomGlass; + this.mHeight = -y; + return mPlascreteCount>=20 && mGlassCount < (int) Math.floor(ratio); } |
