Fixed turbine output falling when supplying more than opt flow
This commit is contained in:
parent
7ac0849c1a
commit
be8d29da74
4 changed files with 4 additions and 0 deletions
|
@ -108,6 +108,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
|
||||||
|
|
||||||
if (totalFlow != actualOptimalFlow) {
|
if (totalFlow != actualOptimalFlow) {
|
||||||
float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow));
|
float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow));
|
||||||
|
if(totalFlow>aOptFlow){efficiency = 1.0f;}
|
||||||
if (efficiency < 0)
|
if (efficiency < 0)
|
||||||
efficiency = 0; // Can happen with really ludicrously poor inefficiency.
|
efficiency = 0; // Can happen with really ludicrously poor inefficiency.
|
||||||
tEU *= efficiency;
|
tEU *= efficiency;
|
||||||
|
|
|
@ -95,6 +95,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
|
||||||
addOutput(GT_ModHandler.getSteam(totalFlow));
|
addOutput(GT_ModHandler.getSteam(totalFlow));
|
||||||
if (totalFlow > 0 && totalFlow != aOptFlow) {
|
if (totalFlow > 0 && totalFlow != aOptFlow) {
|
||||||
float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow));
|
float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow));
|
||||||
|
if(totalFlow>aOptFlow){efficiency = 1.0f;}
|
||||||
tEU *= efficiency;
|
tEU *= efficiency;
|
||||||
tEU = Math.max(1, tEU * aBaseEff / 10000);
|
tEU = Math.max(1, tEU * aBaseEff / 10000);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -109,6 +109,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
|
||||||
|
|
||||||
if (totalFlow != actualOptimalFlow) {
|
if (totalFlow != actualOptimalFlow) {
|
||||||
float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow));
|
float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow));
|
||||||
|
if(totalFlow>aOptFlow){efficiency = 1.0f;}
|
||||||
if (efficiency < 0)
|
if (efficiency < 0)
|
||||||
efficiency = 0; // Can happen with really ludicrously poor inefficiency.
|
efficiency = 0; // Can happen with really ludicrously poor inefficiency.
|
||||||
tEU *= efficiency;
|
tEU *= efficiency;
|
||||||
|
|
|
@ -106,6 +106,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
|
||||||
addOutput(GT_ModHandler.getDistilledWater(waterToOutput));
|
addOutput(GT_ModHandler.getDistilledWater(waterToOutput));
|
||||||
if (totalFlow > 0 && totalFlow != aOptFlow) {
|
if (totalFlow > 0 && totalFlow != aOptFlow) {
|
||||||
float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow));
|
float efficiency = 1.0f - Math.abs(((totalFlow - (float) aOptFlow) / aOptFlow));
|
||||||
|
if(totalFlow>aOptFlow){efficiency = 1.0f;}
|
||||||
tEU *= efficiency;
|
tEU *= efficiency;
|
||||||
tEU = Math.max(1, tEU * aBaseEff / 20000);
|
tEU = Math.max(1, tEU * aBaseEff / 20000);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue