Skip to content

Commit

Permalink
Fix super tank output rate based on the pump used (#1810)
Browse files Browse the repository at this point in the history
* fix tank output speed

* sa
  • Loading branch information
chochem authored Mar 22, 2023
1 parent 664ccba commit 3681f2f
Showing 1 changed file with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,33 @@ protected static int commonSizeCompute(int tier) {
}
}

private static int tierPump(int tier) {
switch (tier) {
case 1:
return 2;
case 2:
return 3;
case 3:
return 3;
case 4:
return 4;
case 5:
return 4;
case 6:
return 5;
case 7:
return 5;
case 8:
return 6;
case 9:
return 7;
case 10:
return 8;
default:
return 0;
}
}

public GT_MetaTileEntity_DigitalTankBase(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
}
Expand Down Expand Up @@ -372,7 +399,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (mOutputFluid && getDrainableStack() != null && (aTick % 20 == 0)) {
IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide(aBaseMetaTileEntity.getFrontFacing());
if (tTank != null) {
FluidStack tDrained = drain(commonSizeCompute(mTier) / 100, false);
FluidStack tDrained = drain(20 * (1 << (3 + 2 * tierPump(mTier))), false);
if (tDrained != null) {
int tFilledAmount = tTank.fill(
ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()),
Expand Down

0 comments on commit 3681f2f

Please sign in to comment.