mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-26 15:03:07 +00:00
#2303 Improve tooltip on KJ/ZG tanks
This commit is contained in:
1 parent
f3bee2c922
commit
3d0ce4bcad
5 files changed
+19
-5
No files matched your search
@@ -19,7 +19,7 @@ import crazypants.util.Lang;
|
||||
|
||||
public class GuiZombieGenerator extends GuiPoweredMachineBase<TileZombieGenerator> {
|
||||
|
||||
public GuiZombieGenerator(InventoryPlayer inventory, TileZombieGenerator tileEntity) {
|
||||
public GuiZombieGenerator(InventoryPlayer inventory, final TileZombieGenerator tileEntity) {
|
||||
super(tileEntity, new ContainerZombieGenerator(inventory, tileEntity));
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(80, 21, 15, 47), "") {
|
||||
@@ -30,8 +30,10 @@ public class GuiZombieGenerator extends GuiPoweredMachineBase<TileZombieGenerato
|
||||
String heading = Lang.localize("zombieGenerator.fuelTank");
|
||||
text.add(heading);
|
||||
text.add(Fluids.toCapactityString(getTileEntity().fuelTank));
|
||||
if(tileEntity.fuelTank.getFluidAmount() < tileEntity.getActivationAmount()) {
|
||||
text.add(Lang.localize("gui.fluid.minReq", tileEntity.getActivationAmount() + Fluids.MB()));
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public class TileZombieGenerator extends AbstractGeneratorEntity implements IFlu
|
||||
}
|
||||
inPause = false;
|
||||
|
||||
if(fuelTank.getFluidAmount() < fuelTank.getCapacity() * 0.7f) {
|
||||
if(fuelTank.getFluidAmount() < getActivationAmount()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -164,6 +164,10 @@ public class TileZombieGenerator extends AbstractGeneratorEntity implements IFlu
|
||||
setEnergyStored(getEnergyStored() + outputPerTick);
|
||||
return true;
|
||||
}
|
||||
|
||||
int getActivationAmount() {
|
||||
return (int) (fuelTank.getCapacity() * 0.7f);
|
||||
}
|
||||
|
||||
private boolean transmitEnergy() {
|
||||
if(getEnergyStored() <= 0) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class GuiKillerJoe extends GuiMachineBase<TileKillerJoe> {
|
||||
private IconButtonEIO xpB;
|
||||
private IconButtonEIO xp10B;
|
||||
|
||||
public GuiKillerJoe(InventoryPlayer inventory, TileKillerJoe tileEntity) {
|
||||
public GuiKillerJoe(InventoryPlayer inventory, final TileKillerJoe tileEntity) {
|
||||
super(tileEntity, new ContainerKillerJoe(inventory, tileEntity));
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(18, 11, 15, 47), "") {
|
||||
@@ -39,6 +39,9 @@ public class GuiKillerJoe extends GuiMachineBase<TileKillerJoe> {
|
||||
String heading = Lang.localize("killerJoe.fuelTank");
|
||||
text.add(heading);
|
||||
text.add(Fluids.toCapactityString(getTileEntity().fuelTank));
|
||||
if(tileEntity.fuelTank.getFluidAmount() < tileEntity.getActivationAmount()) {
|
||||
text.add(Lang.localize("gui.fluid.minReq", tileEntity.getActivationAmount() + Fluids.MB()));
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -158,7 +158,7 @@ public class TileKillerJoe extends AbstractMachineEntity implements IFluidHandle
|
||||
return false;
|
||||
}
|
||||
|
||||
if(fuelTank.getFluidAmount() < fuelTank.getCapacity() * 0.7f) {
|
||||
if(fuelTank.getFluidAmount() < getActivationAmount()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -189,6 +189,10 @@ public class TileKillerJoe extends AbstractMachineEntity implements IFluidHandle
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int getActivationAmount() {
|
||||
return (int) (fuelTank.getCapacity() * 0.7f);
|
||||
}
|
||||
|
||||
private boolean canJoeSee(EntityLivingBase ent)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user