From fd88780087aef8e5c65a40db15f7e4f36f997ef3 Mon Sep 17 00:00:00 2001 From: Steelux <70096037+Steelux8@users.noreply.github.com> Date: Fri, 8 Apr 2022 17:31:56 +0100 Subject: Loose Mode Turbine Changes (#1000) * Loose Mode Turbine Changes - Changed Steam loose mode efficiency and optimal flow to improve this mode, especially on the lategame turbines. Efficiency was capped at 75% regardless of the regular value, with this change setting it to always be a percentage of the tight mode efficiency, down to 60% for those lategame turbines, and a maximum of 90% of the tight mode value for the lowest efficiency turbines. - Also changed the optimal flow calculation to grant a larger optimal flow in loose mode than it was before the change, for all turbines except the highest efficiency ones; - Improved the tooltip for these turbines, updating to these new values, fixing a typo and showing the EU/t for steam at optimal flow, in both modes. * Fixed Weird Spacing * Update GT_MetaGenerated_Tool.java * Remove Duplicate Formula for Loose Mode --- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 47 +++++++++++++++++----- 1 file changed, 37 insertions(+), 10 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 4d11bdaef5..86ed51e879 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -95,16 +95,9 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg @Override int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff) { if (looseFit) { - aOptFlow *= 4; - if (aBaseEff > 10000) { - aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f); - aBaseEff = 7500; - } else if (aBaseEff > 7500) { - aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7500) / 10000F) * 20f); - aBaseEff *= 0.75f; - } else { - aBaseEff *= 0.75f; - } + long[] calculatedFlow = calculateLooseFlow(aOptFlow, aBaseEff); + aOptFlow = GT_Utility.safeInt(calculatedFlow[0]); + aBaseEff = GT_Utility.safeInt(calculatedFlow[1]); } int tEU = 0; int totalFlow = 0; // Byproducts are based on actual flow @@ -144,6 +137,40 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg return tEU; } + public static long[] calculateLooseFlow(int aOptFlow, int aBaseEff) { + aOptFlow *= 4; + if(aBaseEff>=26000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 8000) / 10000F) * 20f); + aBaseEff *= 0.6f; + }else if(aBaseEff>22000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 7000) / 10000F) * 20f); + aBaseEff *= 0.65f; + }else if(aBaseEff>18000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 6000) / 10000F) * 20f); + aBaseEff *= 0.70f; + }else if(aBaseEff>14000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 5000) / 10000F) * 20f); + aBaseEff *= 0.75f; + }else if(aBaseEff>10000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 4000) / 10000F) * 20f); + aBaseEff *= 0.8f; + }else if(aBaseEff>6000) { + aOptFlow *= Math.pow(1.1f, ((aBaseEff - 3000) / 10000F) * 20f); + aBaseEff *= 0.85f; + }else{ + aBaseEff *= 0.9f; + } + + if (aBaseEff % 100 != 0){ + aBaseEff -= aBaseEff % 100; + } + + long[] looseFlow = new long[2]; + looseFlow[0] = GT_Utility.safeInt(aOptFlow); + looseFlow[1] = GT_Utility.safeInt(aBaseEff); + return looseFlow; + } + @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getFrontFacing()) { -- cgit