From 7ac0849c1aa35ad7eaced359e0b70381d3b96392 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 17 Mar 2016 00:28:09 +0100 Subject: [PATCH] Added NC display support for large turbines --- .../multi/GT_MetaTileEntity_LargeTurbine.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) 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 0d4f8b0d..14098be2 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 @@ -190,4 +190,29 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M public boolean explodesOnComponentBreak(ItemStack aStack) { return true; } + + @Override + public String[] getInfoData() { + String tRunning = mMaxProgresstime>0 ? "Turbine running":"Turbine stopped"; + String tMaintainance = getIdealStatus() == getRepairStatus() ? "No Maintainance issues" : "Needs Maintainance" ; + int tDura = 0; + + if (mInventory[1] != null && mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) { + tDura = (int) ((100.0f / GT_MetaGenerated_Tool.getToolMaxDamage(mInventory[1]) * (GT_MetaGenerated_Tool.getToolDamage(mInventory[1]))+1)); + } + + return new String[]{ + "Large Turbine", + tRunning, + "Current output: "+mEUt+" EU/t", + "Current speed: "+(mEfficiency/100)+"%", + tMaintainance, + "Turbine Damage: "+tDura+"%"}; + } + + @Override + public boolean isGivingInformation() { + return true; + } + }