From 2242c651612e0bb38cf2bf66662b349e58d99276 Mon Sep 17 00:00:00 2001 From: Technus Date: Wed, 7 Sep 2016 13:23:55 +0200 Subject: [PATCH] Scanner initial change --- .../GT_MetaTileEntity_BasicBatteryBuffer.java | 6 +++--- .../GT_MetaTileEntity_BasicMachine.java | 8 ++++---- .../GT_MetaTileEntity_MultiBlockBase.java | 8 ++++---- ..._MetaTileEntity_MicrowaveEnergyTransmitter.java | 9 ++++++--- .../multi/GT_MetaTileEntity_DieselEngine.java | 10 +++++----- .../multi/GT_MetaTileEntity_FusionComputer.java | 6 +++--- .../multi/GT_MetaTileEntity_LargeTurbine.java | 4 ++-- .../storage/GT_MetaTileEntity_QuantumChest.java | 14 +++++++------- .../storage/GT_MetaTileEntity_QuantumTank.java | 14 +++++++------- 9 files changed, 41 insertions(+), 38 deletions(-) diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java index 053361cb..2eeab39d 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicBatteryBuffer.java @@ -307,8 +307,8 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier return new String[]{ EnumChatFormatting.BLUE+getLocalName()+EnumChatFormatting.RESET, "Stored Items:", - EnumChatFormatting.GREEN+GT_Utility.formatNumbers(mStored) +EnumChatFormatting.RESET+ " EU / "+ - EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(mMax) +EnumChatFormatting.RESET+ " EU" + EnumChatFormatting.YELLOW+GT_Utility.formatNumbers(mStored) +EnumChatFormatting.RESET+ " EU /", + EnumChatFormatting.RED+GT_Utility.formatNumbers(mMax) +EnumChatFormatting.RESET+ " EU" }; } @@ -316,4 +316,4 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier public boolean isGivingInformation() { return true; } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index e25fa296..f1e4b414 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -690,13 +690,13 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B return new String[]{ EnumChatFormatting.BLUE + mNEIName + EnumChatFormatting.RESET, "Progress:", - EnumChatFormatting.GREEN + Integer.toString(mProgresstime) + EnumChatFormatting.RESET +" ticks / "+ + EnumChatFormatting.GREEN + Integer.toString(mProgresstime) + EnumChatFormatting.RESET +" ticks", EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime) + EnumChatFormatting.RESET +" ticks", "Stored Energy:", - EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU", EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU", "Probably uses:", - EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t at "+ + EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t", EnumChatFormatting.RED + Integer.toString(mEUt==0?0:mAmperage) + EnumChatFormatting.RESET +" A" }; } @@ -839,4 +839,4 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B public ITexture[] getSideFacingPipeInactive(byte aColor) { return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColor + 1], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)}; } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 630044d4..63cb4ec4 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -840,17 +840,17 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public String[] getInfoData() { return new String[]{ "Progress:", - EnumChatFormatting.GREEN + Integer.toString(mProgresstime) + EnumChatFormatting.RESET +" ticks / "+ + EnumChatFormatting.GREEN + Integer.toString(mProgresstime) + EnumChatFormatting.RESET +" ticks", EnumChatFormatting.YELLOW + Integer.toString(mMaxProgresstime) + EnumChatFormatting.RESET +" ticks", "Stored Energy:", - EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + EnumChatFormatting.RESET +" EU", EnumChatFormatting.YELLOW + Long.toString(getBaseMetaTileEntity().getEUCapacity()) + EnumChatFormatting.RESET +" EU", "Probably uses:", EnumChatFormatting.RED + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t", "Maximum total EU/t (to all Energy Hatches, not single ones)", - EnumChatFormatting.YELLOW+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET, + EnumChatFormatting.RESET+Long.toString(getMaxInputVoltage())+EnumChatFormatting.RESET, "Efficiency:", - EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + " %", + EnumChatFormatting.YELLOW+Float.toString(mEfficiency / 100.0F)+EnumChatFormatting.RESET + "%", "Problems:", ""+EnumChatFormatting.RED+ (getIdealStatus() - getRepairStatus())+EnumChatFormatting.RESET}; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java index 77680dc9..bc4e0e5f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java @@ -190,9 +190,12 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt tLoss = GT_Utility.safeInt(10L + (tDistance * Math.max(mMaxLoss - 10L,0) / mMaxLossDistance)); } if(getBaseMetaTileEntity().isUniversalEnergyStored(V[mTier] + ((V[mTier] * tLoss) / 100))){ - if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, V[mTier], 1) > 0) { - getBaseMetaTileEntity().decreaseStoredEnergyUnits(V[mTier] + ((V[mTier] * tLoss) / 100), false); - } + //TODO:check tier before sending to disable remote detonation + //if(((IEnergyConnected) tTile).) + if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, V[mTier], 1) > 0) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(V[mTier] + ((V[mTier] * tLoss) / 100), false); + } + //} } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index b0cd517a..d3b56a8d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -231,11 +231,11 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock public String[] getInfoData() { return new String[]{ EnumChatFormatting.BLUE+"Diesel Engine"+EnumChatFormatting.RESET, - "Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", - "Fuel Consumption: "+EnumChatFormatting.YELLOW+fuelConsumption+EnumChatFormatting.RESET+" L/t", - "Fuel Value: "+EnumChatFormatting.YELLOW+fuelValue+EnumChatFormatting.RESET+" EU/L", - "Fuel Remaining: "+EnumChatFormatting.GOLD+fuelRemaining+EnumChatFormatting.RESET+" L", - "Current Efficiency: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.YELLOW+" %"}; + "Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", + "Fuel Consumption: "+EnumChatFormatting.YELLOW+fuelConsumption+EnumChatFormatting.RESET+"L/t", + "Fuel Value: "+EnumChatFormatting.YELLOW+fuelValue+EnumChatFormatting.RESET+" EU/L", + "Fuel Remaining: "+EnumChatFormatting.YELLOW+fuelRemaining+EnumChatFormatting.RESET+" Litres", + "Current Efficiency: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.YELLOW+"%"}; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index 73273efb..37c6ce77 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -457,12 +457,12 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity return new String[]{ EnumChatFormatting.BLUE+"Fusion Reactor MK "+EnumChatFormatting.RESET+tier, "EU Required: "+EnumChatFormatting.RED+powerRequired+EnumChatFormatting.RESET+"EU/t", - "Stored EU: "+EnumChatFormatting.GREEN+mEUStore+EnumChatFormatting.RESET+" EU / "+EnumChatFormatting.YELLOW+maxEUStore()+EnumChatFormatting.RESET+" EU", - "Plasma Output: "+EnumChatFormatting.YELLOW+plasmaOut+EnumChatFormatting.RESET+"L/t"}; + "Stored EU: "+EnumChatFormatting.YELLOW+mEUStore+EnumChatFormatting.RESET+" / "+maxEUStore(), + "Plasma Output: "+EnumChatFormatting.GREEN+plasmaOut+EnumChatFormatting.RESET+"L/t"}; } @Override public boolean isGivingInformation() { return true; } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index c961dd31..feb323cd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -216,8 +216,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M EnumChatFormatting.BLUE+"Large Turbine"+EnumChatFormatting.RESET, tRunning, "Current Output: "+EnumChatFormatting.RED+mEUt+EnumChatFormatting.RESET+" EU/t", - "Optimal Flow: "+EnumChatFormatting.YELLOW+(int)realOptFlow+EnumChatFormatting.RESET+" L/t", - "Fuel Remaining: "+EnumChatFormatting.GOLD+storedFluid+EnumChatFormatting.RESET+"L", + "Optimal Flow: "+EnumChatFormatting.YELLOW+GT_Utility.safeInt((long)realOptFlow)+EnumChatFormatting.RESET+" L/t", + "Fuel Remaining: "+EnumChatFormatting.YELLOW+storedFluid+EnumChatFormatting.RESET+"L", "Current Speed: "+EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.RESET+"%", "Turbine Damage: "+EnumChatFormatting.RED+Integer.toString(tDura)+EnumChatFormatting.RESET+"%", tMaintainance diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java index 3ef39ccc..7799fb8d 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java @@ -184,17 +184,17 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach return new String[]{ EnumChatFormatting.BLUE + "Quantum Chest"+ EnumChatFormatting.RESET, "Stored Items:", - EnumChatFormatting.GOLD+ "No Items"+ EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + "0" + EnumChatFormatting.RESET+" "+ - EnumChatFormatting.YELLOW + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + "No Items"+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + "0" + EnumChatFormatting.RESET, + EnumChatFormatting.RED + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET }; } return new String[]{ EnumChatFormatting.BLUE + "Quantum Chest"+ EnumChatFormatting.RESET, "Stored Items:", - EnumChatFormatting.GOLD + mItemStack.getDisplayName() + EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + Integer.toString(mItemCount) + EnumChatFormatting.RESET+" "+ - EnumChatFormatting.YELLOW + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + mItemStack.getDisplayName() + EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mItemCount) + EnumChatFormatting.RESET, + EnumChatFormatting.RED + Integer.toString(getMaxItemCount())+ EnumChatFormatting.RESET }; } @@ -230,4 +230,4 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach public ITexture[][][] getTextureSet(ITexture[] aTextures) { return new ITexture[0][0][0]; } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java index 3eeac1bc..c9fb6558 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumTank.java @@ -104,17 +104,17 @@ public class GT_MetaTileEntity_QuantumTank return new String[]{ EnumChatFormatting.BLUE + "Quantum Tank"+ EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + "No Fluid"+ EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + Integer.toString(0) + " L"+ EnumChatFormatting.RESET+" "+ - EnumChatFormatting.YELLOW + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + "No Fluid"+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(0) + " L"+ EnumChatFormatting.RESET, + EnumChatFormatting.RED + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET }; } return new String[]{ EnumChatFormatting.BLUE + "Quantum Tank"+ EnumChatFormatting.RESET, "Stored Fluid:", - EnumChatFormatting.GOLD + mFluid.getLocalizedName()+ EnumChatFormatting.RESET, - EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L"+ EnumChatFormatting.RESET+" "+ - EnumChatFormatting.YELLOW+ Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET + EnumChatFormatting.YELLOW + mFluid.getLocalizedName()+ EnumChatFormatting.RESET, + EnumChatFormatting.GREEN + Integer.toString(mFluid.amount) + " L"+ EnumChatFormatting.RESET, + EnumChatFormatting.RED + Integer.toString(getCapacity()) + " L"+ EnumChatFormatting.RESET }; } @@ -138,4 +138,4 @@ public class GT_MetaTileEntity_QuantumTank return 100; } -} \ No newline at end of file +}