From 06636fd1497ae9513e0bda9c61985a01177cef15 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 232ef19f..73f1b6dc 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 @@ -111,7 +111,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 d45c5a82..0fa83be8 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 @@ -125,7 +125,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;