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

Commit

Permalink
tweak EU capacity and power restriction for a single hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
HoleFish committed Mar 7, 2024
1 parent 3ed6dcc commit 83859f8
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,22 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Fusion Reactor").addInfo("Millions of nuclear.")
.addInfo("Controller block for the Compact Fusion Reactor MK-I Prototype.")
.addInfo("131,072EU/t and 5M EU capacity per Energy Hatch")
.addInfo(
EnumChatFormatting.BLUE + GT_Utility.formatNumbers(getSingleHatchPower())
+ EnumChatFormatting.GRAY
+ "EU/t and "
+ EnumChatFormatting.BLUE
+ GT_Utility.formatNumbers(capableStartupCanonical() / 32 / M)
+ "M"
+ EnumChatFormatting.GRAY
+ " EU capacity per Energy Hatch")
.addInfo("If the recipe has a startup cost greater than the")
.addInfo("number of energy hatches * cap, you can't do it")
.addInfo(
"If the recipe requires a voltage tier over "
+ GT_Utility.getColoredTierNameFromTier((byte) tier())
+ EnumChatFormatting.GRAY
+ " , you can't do it either")
.addInfo("Make sure the whole structure is built in the 3x3")
.addInfo("chunk area of the ring center (not controller).").addInfo("It can run 64x recipes at most.")
.addInfo(
Expand Down Expand Up @@ -72,11 +85,6 @@ public int tier() {
return 6;
}

@Override
public long maxEUStore() {
return 160008000L * (Math.min(32, this.mEnergyHatches.size() + this.eEnergyMulti.size())) / 32L;
}

@Override
public long capableStartupCanonical() {
return 160_000_000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,25 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Fusion Reactor").addInfo("Millions of nuclear.")
.addInfo("Controller block for the Compact Fusion Reactor MK-II.")
.addInfo("524,288EU/t and 10M EU capacity per Energy Hatch")
.addInfo(
EnumChatFormatting.BLUE + GT_Utility.formatNumbers(getSingleHatchPower())
+ EnumChatFormatting.GRAY
+ "EU/t and "
+ EnumChatFormatting.BLUE
+ GT_Utility.formatNumbers(capableStartupCanonical() / 32 / M)
+ "M"
+ EnumChatFormatting.GRAY
+ " EU capacity per Energy Hatch")
.addInfo("If the recipe has a startup cost greater than the")
.addInfo("number of energy hatches * cap, you can't do it")
.addInfo(
"If the recipe requires a voltage tier over "
+ GT_Utility.getColoredTierNameFromTier((byte) tier())
+ EnumChatFormatting.GRAY
+ " , you can't do it either")
.addInfo("Make sure the whole structure is built in the 3x3")
.addInfo("chunk area of the ring center (not controller).")
.addInfo("Startup < 160,000,000 EU: 128x Parallel").addInfo("Startup < 320,000,000 EU: 64x Parallel")
.addInfo("Startup < 160,000,000 EU: 128x Parallel").addInfo("Startup >= 160,000,000 EU: 64x Parallel")
.addInfo(
"Support" + EnumChatFormatting.BLUE
+ " Tec"
Expand All @@ -73,11 +86,6 @@ public int tier() {
return 7;
}

@Override
public long maxEUStore() {
return 320006000L * (Math.min(32, this.mEnergyHatches.size() + this.eEnergyMulti.size())) / 32L;
}

@Override
public long capableStartupCanonical() {
return 320_000_000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,26 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Fusion Reactor").addInfo("Millions of nuclear.")
.addInfo("Controller block for the Compact Fusion Reactor MK-III.")
.addInfo("1,572,864EU/t and 20M EU capacity per Energy Hatch")
.addInfo(
EnumChatFormatting.BLUE + GT_Utility.formatNumbers(getSingleHatchPower())
+ EnumChatFormatting.GRAY
+ "EU/t and "
+ EnumChatFormatting.BLUE
+ GT_Utility.formatNumbers(capableStartupCanonical() / 32 / M)
+ "M"
+ EnumChatFormatting.GRAY
+ " EU capacity per Energy Hatch")
.addInfo("If the recipe has a startup cost greater than the")
.addInfo("number of energy hatches * cap, you can't do it")
.addInfo(
"If the recipe requires a voltage tier over "
+ GT_Utility.getColoredTierNameFromTier((byte) tier())
+ EnumChatFormatting.GRAY
+ " , you can't do it either")
.addInfo("Make sure the whole structure is built in the 3x3")
.addInfo("chunk area of the ring center (not controller).")
.addInfo("Startup < 160,000,000 EU: 192x Parallel").addInfo("Startup < 320,000,000 EU: 128x Parallel")
.addInfo("Startup < 640,000,000 EU: 64x Parallel")
.addInfo("Startup >= 320,000,000 EU: 64x Parallel")
.addInfo(
"Support" + EnumChatFormatting.BLUE
+ " Tec"
Expand All @@ -74,11 +87,6 @@ public int tier() {
return 8;
}

@Override
public long maxEUStore() {
return 640060000L * (Math.min(32, this.mEnergyHatches.size() + this.eEnergyMulti.size())) / 32L;
}

@Override
public long capableStartupCanonical() {
return 640_000_000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,22 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Fusion Reactor").addInfo("Galaxy Collapse.")
.addInfo("Controller block for the Compact Fusion Reactor MK-IV Prototype.")
.addInfo("33,554,432EU/t and 80M EU capacity per Energy Hatch")
.addInfo(
EnumChatFormatting.BLUE + GT_Utility.formatNumbers(getSingleHatchPower())
+ EnumChatFormatting.GRAY
+ "EU/t and "
+ EnumChatFormatting.BLUE
+ GT_Utility.formatNumbers(capableStartupCanonical() / 32 / M)
+ "M"
+ EnumChatFormatting.GRAY
+ " EU capacity per Energy Hatch")
.addInfo("If the recipe has a startup cost greater than the")
.addInfo("number of energy hatches * cap, you can't do it")
.addInfo(
"If the recipe requires a voltage tier over "
+ GT_Utility.getColoredTierNameFromTier((byte) tier())
+ EnumChatFormatting.GRAY
+ " , you can't do it either")
.addInfo("Make sure the whole structure is built in the 3x3")
.addInfo("chunk area of the ring center (not controller).").addInfo("Performs 4/4 overclock.")
.addInfo("Startup < 160,000,000 EU: 256x Parallel").addInfo("Startup < 320,000,000 EU: 192x Parallel")
Expand Down Expand Up @@ -79,14 +92,9 @@ public int tier() {
return 9;
}

@Override
public long maxEUStore() {
return 2560060000L * (Math.min(32, this.mEnergyHatches.size() + this.eEnergyMulti.size())) / 32L;
}

@Override
public long capableStartupCanonical() {
return 2_560_060_000L;
return 5_120_000_000L;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,22 @@ protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType("Fusion Reactor").addInfo("Galaxy Collapse.")
.addInfo("Controller block for the Compact Fusion Reactor MK-V.")
.addInfo("167,772,160EU/t and 320M EU capacity per Energy Hatch")
.addInfo(
EnumChatFormatting.BLUE + GT_Utility.formatNumbers(getSingleHatchPower())
+ EnumChatFormatting.GRAY
+ "EU/t and "
+ EnumChatFormatting.BLUE
+ GT_Utility.formatNumbers(capableStartupCanonical() / 32 / M)
+ "M"
+ EnumChatFormatting.GRAY
+ " EU capacity per Energy Hatch")
.addInfo("If the recipe has a startup cost greater than the")
.addInfo("number of energy hatches * cap, you can't do it")
.addInfo(
"If the recipe requires a voltage tier over "
+ GT_Utility.getColoredTierNameFromTier((byte) tier())
+ EnumChatFormatting.GRAY
+ " , you can't do it either")
.addInfo("Make sure the whole structure is built in the 3x3")
.addInfo("chunk area of the ring center (not controller).").addInfo("Performs 4/4 overclock.")
.addInfo("Startup < 160,000,000 EU: 320x Parallel").addInfo("Startup < 320,000,000 EU: 256x Parallel")
Expand Down Expand Up @@ -79,14 +92,9 @@ public int tier() {
return 10;
}

@Override
public long maxEUStore() {
return 10240800000L * (Math.min(32, this.mEnergyHatches.size() + this.eEnergyMulti.size())) / 32L;
}

@Override
public long capableStartupCanonical() {
return 10_240_800_000L;
return 20_480_000_000L;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public abstract class LargeFusionComputer extends GT_MetaTileEntity_TooltipMulti
implements IConstructable, ISurvivalConstructable, IOverclockDescriptionProvider {

public static final String MAIN_NAME = "largeFusion";
public static final int M = 1_000_000;
private boolean isLoadedChunk;
public GT_Recipe mLastRecipe;
public int para;
Expand Down Expand Up @@ -140,7 +141,9 @@ public OverclockDescriber getOverclockDescriber() {
public abstract int tier();

@Override
public abstract long maxEUStore();
public long maxEUStore() {
return capableStartupCanonical() * (Math.min(32, this.mEnergyHatches.size() + this.eEnergyMulti.size())) / 32L;
}

/**
* Unlike {@link #maxEUStore()}, this provides theoretical limit of startup EU, without considering the amount of
Expand Down Expand Up @@ -354,7 +357,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
* @return The power one hatch can deliver to the reactor
*/
protected long getSingleHatchPower() {
return 2048L * tierOverclock() * getMaxPara() * extraPara(100);
return GT_Values.V[tier()] * getMaxPara() * extraPara(100);
}

public boolean turnCasingActive(boolean status) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;

import gregtech.api.logic.ProcessingLogic;
import gregtech.api.objects.overclockdescriber.OverclockDescriber;
import gregtech.api.util.AdvancedFusionOverclockDescriber;

public abstract class LargeFusionComputerPP extends LargeFusionComputer {

Expand All @@ -29,14 +30,8 @@ public LargeFusionComputerPP(int id, String name, String nameRegional) {
}

@Override
protected ProcessingLogic createProcessingLogic() {
return super.createProcessingLogic().setOverclock(2, 2);
}

@Override
protected long getSingleHatchPower() {
// Multiply by 8 so that we can have the original input power per hatch
return super.getSingleHatchPower() * 8;
protected OverclockDescriber createOverclockDescriber() {
return new AdvancedFusionOverclockDescriber((byte) tier(), capableStartupCanonical());
}

@Override
Expand Down

0 comments on commit 83859f8

Please sign in to comment.