From dcf348a7e11ec66470ca151e7e4e7576dc083810 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Tue, 29 Nov 2016 14:21:15 -1000 Subject: [PATCH] Fix efficiency penalty incorrectly applied to large gas+plasma turbines This is a copy-paste error from the original code in the large steam turbine. `aOptFlow` is the optimal flow rate expressed in EU/t, while `totalFlow` is expressed in fuel L/t --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 2 +- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 3e3b7acf..ca00bd52 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -112,7 +112,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT if (totalFlow != actualOptimalFlow) { float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); - if(totalFlow>aOptFlow){efficiency = 1.0f;} + if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} if (efficiency < 0) efficiency = 0; // Can happen with really ludicrously poor inefficiency. tEU *= efficiency; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 28e3b7a1..5d5bf9ad 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -127,7 +127,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar if (totalFlow != actualOptimalFlow) { float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); - if(totalFlow>aOptFlow){efficiency = 1.0f;} + if(totalFlow>actualOptimalFlow){efficiency = 1.0f;} if (efficiency < 0) efficiency = 0; // Can happen with really ludicrously poor inefficiency. tEU *= efficiency;