Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Fix compact fusion tierskip, wrong OC and scanner info (#238)
Browse files Browse the repository at this point in the history
* negate scanner eu/t

* prevent fusion tierskips

* stop compacts from overclocking on-tier recipes

* undo star import
  • Loading branch information
GDCloudstrike authored Feb 22, 2024
1 parent 642c762 commit f9d58f5
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static gregtech.api.util.GT_StructureUtility.filterByMTETier;
import static gregtech.api.util.GT_StructureUtility.ofFrame;
import static gregtech.api.util.GT_Utility.filterValidMTEs;
import static gregtech.api.util.GT_Utility.roundUpVoltage;

import java.util.List;

Expand Down Expand Up @@ -449,13 +450,18 @@ protected GT_ParallelHelper createParallelHelper(@NotNull GT_Recipe recipe) {
@NotNull
@Override
protected GT_OverclockCalculator createOverclockCalculator(@NotNull GT_Recipe recipe) {
return super.createOverclockCalculator(recipe).limitOverclockCount(overclock(recipe.mSpecialValue));
int overclockCount = overclock(recipe.mSpecialValue);
if (GT_Values.VP[LargeFusionComputer.this.tier()] <= roundUpVoltage(recipe.mEUt)) {
overclockCount = 0;
}
return super.createOverclockCalculator(recipe).limitOverclockCount(overclockCount);
}

@NotNull
@Override
protected CheckRecipeResult validateRecipe(@NotNull GT_Recipe recipe) {
if (!mRunningOnLoad && recipe.mSpecialValue > maxEUStore()) {
if (!mRunningOnLoad && recipe.mSpecialValue > maxEUStore()
|| GT_Values.VP[LargeFusionComputer.this.tier()] < recipe.mEUt) {
return CheckRecipeResultRegistry.insufficientStartupPower(recipe.mSpecialValue);
}
maxParallel = getMaxPara() * extraPara(recipe.mSpecialValue);
Expand Down Expand Up @@ -588,7 +594,7 @@ public String[] getInfoData() {
+ EnumChatFormatting.RESET,
StatCollector.translateToLocal("GT5U.fusion.req") + ": "
+ EnumChatFormatting.RED
+ GT_Utility.formatNumbers(lEUt)
+ GT_Utility.formatNumbers(-lEUt)
+ EnumChatFormatting.RESET
+ "EU/t",
StatCollector.translateToLocal("GT5U.multiblock.energy") + ": "
Expand Down

0 comments on commit f9d58f5

Please sign in to comment.