Fix tooltip for vibration chamber (#3675)

This commit is contained in:
fscan
2018-08-30 23:13:38 +02:00
committed by yueh
parent 758377ed5d
commit ed8baf8c15
3 changed files with 20 additions and 23 deletions
@@ -58,11 +58,11 @@ public class GuiVibrationChamber extends AEBaseGui
this.fontRenderer.drawString( this.getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
this.fontRenderer.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
this.pb.setFullMsg( this.cvc.getAePerTick() * this.cvc.getCurrentProgress() / 100 + " AE/t" );
this.pb.setFullMsg( TileVibrationChamber.POWER_PER_TICK * this.cvc.getCurrentProgress() / TileVibrationChamber.DILATION_SCALING + " AE/t" );
if( this.cvc.getCurrentProgress() > 0 )
if( this.cvc.getRemainingBurnTime() > 0 )
{
final int i1 = this.cvc.getCurrentProgress();
final int i1 = this.cvc.getRemainingBurnTime() * 12 / 100;
this.bindTexture( "guis/vibchamber.png" );
GlStateManager.color( 1, 1, 1 );
final int l = -15;
@@ -31,14 +31,11 @@ import appeng.util.Platform;
public class ContainerVibrationChamber extends AEBaseContainer implements IProgressProvider
{
private static final int MAX_BURN_TIME = 200;
private final int aePerTick = 5;
private final TileVibrationChamber vibrationChamber;
@GuiSync( 0 )
public int burnProgress = 0;
public int burnSpeed = 0;
@GuiSync( 1 )
public int burnSpeed = 100;
public int remainingBurnTime = 0;
public ContainerVibrationChamber( final InventoryPlayer ip, final TileVibrationChamber vibrationChamber )
{
@@ -56,28 +53,28 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
{
if( Platform.isServer() )
{
this.burnProgress = (int) ( this.vibrationChamber.getMaxBurnTime() <= 0 ? 0 : 12 * this.vibrationChamber.getBurnTime() / this.vibrationChamber
.getMaxBurnTime() );
this.burnSpeed = this.vibrationChamber.getBurnSpeed();
}
this.remainingBurnTime = this.vibrationChamber
.getMaxBurnTime() <= 0 ? 0 : (int) ( 100.0 * this.vibrationChamber.getBurnTime() / this.vibrationChamber.getMaxBurnTime() );
this.burnSpeed = this.remainingBurnTime <= 0 ? 0 : this.vibrationChamber.getBurnSpeed();
}
super.detectAndSendChanges();
}
@Override
public int getCurrentProgress()
{
return this.burnProgress > 0 ? this.burnSpeed : 0;
return this.burnSpeed;
}
public int getRemainingBurnTime()
{
return this.remainingBurnTime;
}
@Override
public int getMaxProgress()
{
return MAX_BURN_TIME;
}
public int getAePerTick()
{
return this.aePerTick;
return TileVibrationChamber.MAX_BURN_SPEED;
}
}
@@ -53,10 +53,10 @@ import appeng.util.inv.filter.IAEItemFilter;
public class TileVibrationChamber extends AENetworkInvTile implements IGridTickable
{
private static final double POWER_PER_TICK = 5;
private static final int MAX_BURN_SPEED = 200;
private static final double DILATION_SCALING = 25.0; // x4 ~ 40 AE/t at max
private static final int MIN_BURN_SPEED = 20;
public static final double POWER_PER_TICK = 5;
public static final int MIN_BURN_SPEED = 20;
public static final int MAX_BURN_SPEED = 200;
public static final double DILATION_SCALING = 25.0; // x4 ~ 40 AE/t at max
private final AppEngInternalInventory inv = new AppEngInternalInventory( this, 1 );
private final IItemHandler invExt = new WrapperFilteredItemHandler( this.inv, new FuelSlotFilter() );