Skip to content

Commit

Permalink
move MAX+ tiers into VOCN and VOCNF arrays (#2615)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 authored Sep 22, 2024
1 parent c3a02b5 commit ad02d8e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
25 changes: 22 additions & 3 deletions src/main/java/gregtech/api/GTValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,33 @@ public class GTValues {
* The short names for the voltages, used for registration primarily
*/
public static final String[] VN = new String[] { "ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV",
"UEV", "UIV", "UXV", "OpV", "MAX", "MAX+" };
"UEV", "UIV", "UXV", "OpV", "MAX" };

/**
* The short names for the voltages, formatted for text
* The short names for the voltages, up to max Long, used for registration primarily
*/
public static final String MAX_PLUS = RED.toString() + BOLD + "M" + YELLOW + BOLD + "A" + GREEN + BOLD + "X" +
public static final String[] VOCN = new String[] { "ULV", "LV", "MV", "HV", "EV", "IV", "LuV", "ZPM", "UV", "UHV",
"UEV", "UIV", "UXV", "OpV", "MAX", "MAX+1", "MAX+2", "MAX+3", "MAX+4", "MAX+5", "MAX+6", "MAX+7", "MAX+8",
"MAX+9", "MAX+10", "MAX+11", "MAX+12", "MAX+13", "MAX+14", "MAX+15", "MAX+16",
};

private static final String MAX_PLUS = RED.toString() + BOLD + "M" + YELLOW + BOLD + "A" + GREEN + BOLD + "X" +
AQUA + BOLD + "+" + LIGHT_PURPLE + BOLD;

/**
* The short names for the voltages, formatted for text
*/
public static final String[] VNF = new String[] {
DARK_GRAY + "ULV", GRAY + "LV", AQUA + "MV",
GOLD + "HV", DARK_PURPLE + "EV", DARK_BLUE + "IV",
LIGHT_PURPLE + "LuV", RED + "ZPM", DARK_AQUA + "UV",
DARK_RED + "UHV", GREEN + "UEV", DARK_GREEN + "UIV",
YELLOW + "UXV", BLUE + "OpV", RED.toString() + BOLD + "MAX" };

/**
* The short names for the voltages, up to max Long, formatted for text
*/
public static final String[] VOCNF = new String[] {
DARK_GRAY + "ULV", GRAY + "LV", AQUA + "MV",
GOLD + "HV", DARK_PURPLE + "EV", DARK_BLUE + "IV",
LIGHT_PURPLE + "LuV", RED + "ZPM", DARK_AQUA + "UV",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Builder addEnergyUsageLine(IEnergyContainer energyContainer) {
String energyFormatted = TextFormattingUtil.formatNumbers(maxVoltage);
// wrap in text component to keep it from being formatted
ITextComponent voltageName = new TextComponentString(
GTValues.VNF[GTUtility.getFloorTierByVoltage(maxVoltage)]);
GTValues.VOCNF[GTUtility.getFloorTierByVoltage(maxVoltage)]);

ITextComponent bodyText = TextComponentUtil.translationWithColor(
TextFormatting.GRAY,
Expand Down Expand Up @@ -138,7 +138,7 @@ public Builder addEnergyUsageExactLine(long energyUsage) {
String energyFormatted = TextFormattingUtil.formatNumbers(energyUsage);
// wrap in text component to keep it from being formatted
ITextComponent voltageName = new TextComponentString(
GTValues.VNF[GTUtility.getOCTierByVoltage(energyUsage)]);
GTValues.VOCNF[GTUtility.getOCTierByVoltage(energyUsage)]);

textList.add(TextComponentUtil.translationWithColor(
TextFormatting.GRAY,
Expand All @@ -159,7 +159,7 @@ public Builder addEnergyProductionLine(long maxVoltage, long recipeEUt) {
String energyFormatted = TextFormattingUtil.formatNumbers(maxVoltage);
// wrap in text component to keep it from being formatted
ITextComponent voltageName = new TextComponentString(
GTValues.VNF[GTUtility.getFloorTierByVoltage(maxVoltage)]);
GTValues.VOCNF[GTUtility.getFloorTierByVoltage(maxVoltage)]);

textList.add(TextComponentUtil.translationWithColor(
TextFormatting.GRAY,
Expand All @@ -182,7 +182,7 @@ public Builder addEnergyProductionAmpsLine(long maxVoltage, int amperage) {
String energyFormatted = TextFormattingUtil.formatNumbers(maxVoltage);
// wrap in text component to keep it from being formatted
ITextComponent voltageName = new TextComponentString(
GTValues.VNF[GTUtility.getFloorTierByVoltage(maxVoltage)]);
GTValues.VOCNF[GTUtility.getFloorTierByVoltage(maxVoltage)]);

textList.add(TextComponentUtil.translationWithColor(
TextFormatting.GRAY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected ModularUI createUI(EntityPlayer entityPlayer) {
} else {
voltage = V[MAX];
amps = Integer.MAX_VALUE;
setTier = 14;
setTier = MAX;
}
}, "gregtech.creative.energy.sink", "gregtech.creative.energy.source"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public List<String> getWailaBody(ItemStack itemStack, List<String> tooltip, IWai
}
if (endText == null) {
endText = ": " + TextFormattingUtil.formatNumbers(eut) + TextFormatting.RESET + " EU/t (" +
GTValues.VNF[GTUtility.getOCTierByVoltage(eut)] + TextFormatting.RESET + ")";
GTValues.VOCNF[GTUtility.getOCTierByVoltage(eut)] + TextFormatting.RESET + ")";
}

if (eut == 0) return tooltip;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected void addProbeInfo(@NotNull AbstractRecipeLogic capability, @NotNull IP
// IGregTechTileEntity...)
text = TextFormatting.RED + TextFormattingUtil.formatNumbers(eut) + TextStyleClass.INFO +
" EU/t" + TextFormatting.GREEN +
" (" + GTValues.VNF[GTUtility.getOCTierByVoltage(eut)] + TextFormatting.GREEN + ")";
" (" + GTValues.VOCNF[GTUtility.getOCTierByVoltage(eut)] + TextFormatting.GREEN + ")";
}

if (eut == 0) return; // do not display 0 eut
Expand Down

0 comments on commit ad02d8e

Please sign in to comment.