diff options
author | Sampsa <69092953+S4mpsa@users.noreply.github.com> | 2024-09-09 19:25:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 18:25:33 +0200 |
commit | 4058d5abf8f70468af8acb50758da927b2aedf82 (patch) | |
tree | 610bcff537bf618c27fe91982472f0d1bf56d93f /src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGas.java | |
parent | abba7f744b7e215a5de73b15c2234caaf97ec91e (diff) | |
download | GT5-Unofficial-4058d5abf8f70468af8acb50758da927b2aedf82.tar.gz GT5-Unofficial-4058d5abf8f70468af8acb50758da927b2aedf82.tar.bz2 GT5-Unofficial-4058d5abf8f70468af8acb50758da927b2aedf82.zip |
Large Large & Larger Turbine Rework (#3075)
Co-authored-by: Daniel Mendes <steelux7@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: NotAPenguin <michiel.vandeginste@gmail.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGas.java')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGas.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGas.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGas.java index 268bbf5da4..ff78aec1f1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeTurbineGas.java @@ -24,6 +24,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.TurbineStatCalculator; public class MTELargeTurbineGas extends MTELargeTurbine { @@ -57,6 +58,8 @@ public class MTELargeTurbineGas extends MTELargeTurbine { tt.addMachineType("Gas Turbine") .addInfo("Controller block for the Large Gas Turbine") .addInfo("Needs a Turbine, place inside controller") + .addInfo("Warning: Will be capped at 8192 EU/t in a future update") + .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option") // .addInfo("The excess fuel that gets consumed will be voided!") .addPollutionAmount(getPollutionPerSecond(null)) .addSeparator() @@ -126,8 +129,7 @@ public class MTELargeTurbineGas extends MTELargeTurbine { } @Override - int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff, int overflowMultiplier, - float[] flowMultipliers) { + int fluidIntoPower(ArrayList<FluidStack> aFluids, TurbineStatCalculator turbine) { if (aFluids.size() >= 1) { int tEU = 0; int actualOptimalFlow = 0; @@ -136,17 +138,18 @@ public class MTELargeTurbineGas extends MTELargeTurbine { // Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); - if (aOptFlow < fuelValue) { + if (turbine.getOptimalGasEUt() < fuelValue) { // turbine too weak and/or fuel too powerful // at least consume 1L this.realOptFlow = 1; // wastes the extra fuel and generate aOptFlow directly depleteInput(new FluidStack(firstFuelType, 1)); this.storedFluid += 1; - return GTUtility.safeInt((long) aOptFlow * (long) aBaseEff / 10000L); + return GTUtility.safeInt((long) turbine.getOptimalGasEUt()); } - actualOptimalFlow = GTUtility.safeInt((long) (aOptFlow * flowMultipliers[1] / fuelValue)); + actualOptimalFlow = GTUtility.safeInt( + (long) ((looseFit ? turbine.getOptimalLooseGasFlow() : turbine.getOptimalGasFlow()) / fuelValue)); this.realOptFlow = actualOptimalFlow; // Allowed to use up to 450% optimal flow rate, depending on the value of overflowMultiplier. @@ -158,7 +161,8 @@ public class MTELargeTurbineGas extends MTELargeTurbine { // - 300% if it is 2 // - 450% if it is 3 // Variable required outside of loop for multi-hatch scenarios. - int remainingFlow = GTUtility.safeInt((long) (actualOptimalFlow * (1.5f * overflowMultiplier))); + int remainingFlow = GTUtility + .safeInt((long) (actualOptimalFlow * (1.5f * turbine.getOverflowEfficiency()))); int flow = 0; int totalFlow = 0; @@ -176,10 +180,11 @@ public class MTELargeTurbineGas extends MTELargeTurbine { tEU = GTUtility.safeInt((long) totalFlow * fuelValue); if (totalFlow != actualOptimalFlow) { - float efficiency = getOverflowEfficiency(totalFlow, actualOptimalFlow, overflowMultiplier); + float efficiency = getOverflowEfficiency(totalFlow, actualOptimalFlow, turbine.getOverflowEfficiency()); tEU *= efficiency; } - tEU = GTUtility.safeInt((long) tEU * (long) aBaseEff / 10000L); + tEU = GTUtility + .safeInt((long) (tEU * (looseFit ? turbine.getLooseGasEfficiency() : turbine.getGasEfficiency()))); // EU/t output cap to properly tier the LGT against the Advanced LGT, will be implemented in a future dev // update |