From 7cecaf8f6ce2a6c61e6a23b514d1ecb3412c71f2 Mon Sep 17 00:00:00 2001 From: PureBluez Date: Sun, 12 Jan 2025 22:29:37 -0600 Subject: [PATCH] update tooltip for new tiers --- .../gregtech/api/util/GTLanguageManager.java | 2 +- .../machines/multi/MTESolarFactory.java | 27 ++++++++++++------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/main/java/gregtech/api/util/GTLanguageManager.java b/src/main/java/gregtech/api/util/GTLanguageManager.java index 998861a2975..50e61be359a 100644 --- a/src/main/java/gregtech/api/util/GTLanguageManager.java +++ b/src/main/java/gregtech/api/util/GTLanguageManager.java @@ -550,7 +550,7 @@ public static void writePlaceholderStrings() { addStringLocalization("Interaction_DESCRIPTION_Index_507", "Safe Mode"); addStringLocalization("Interaction_DESCRIPTION_Index_508", "Requires Stabilized Black Hole"); addStringLocalization("Interaction_DESCRIPTION_Index_509", "Requires HIP Unit"); - addStringLocalization("Interaction_DESCRIPTION_Index_510", "Tier required: "); + addStringLocalization("Interaction_DESCRIPTION_Index_510", "Multi Tier required: "); addStringLocalization("Interaction_DESCRIPTION_Index_602", "Use Private Frequency"); addStringLocalization("Interaction_DESCRIPTION_Index_756", "Connectable: "); addStringLocalization("Interaction_DESCRIPTION_Index_ALL", "All"); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTESolarFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTESolarFactory.java index da92cf3ad85..438d793132a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTESolarFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTESolarFactory.java @@ -12,6 +12,8 @@ import static gregtech.api.util.GTStructureUtility.ofFrame; import static gregtech.api.util.GTUtility.copyAmount; import static gregtech.api.util.GTUtility.copyAmountUnsafe; +import static net.minecraft.util.EnumChatFormatting.AQUA; +import static net.minecraft.util.EnumChatFormatting.BOLD; import static net.minecraft.util.EnumChatFormatting.WHITE; import javax.annotation.Nonnull; @@ -56,6 +58,8 @@ import gregtech.api.util.ParallelHelper; import gregtech.api.util.recipe.SolarFactoryRecipeData; +// TODO: add actual structures and update tooltip structure info accordingly + public class MTESolarFactory extends MTEExtendedPowerMultiBlockBase implements IConstructable, ISurvivalConstructable { @@ -68,7 +72,7 @@ public class MTESolarFactory extends MTEExtendedPowerMultiBlockBase> validWafers = ImmutableList.of( @@ -201,7 +205,7 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a mTier = 2; } else if (checkPiece(STRUCTURE_TIER_3, 1, 1, 0)) { mTier = 3; - } else mTier = 0; + } getBaseMetaTileEntity().sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, getUpdateData()); return mTier > 0 && casingAmount >= 8 && (mTier < 2 || casingTier >= -1); } @@ -235,8 +239,8 @@ public int survivalConstruct(ItemStack holoStack, int elementBudget, ISurvivalBu } protected ItemStack[] calculateNewOutput(ItemStack currentOutput, int seed) { - double calculatedMultiplier = ((outputMultiplierSlope * seed) + 1) > outputMultiplierCap ? outputMultiplierCap - : ((outputMultiplierSlope * seed) + 1); + outputMultiplierSlope = mTier >= 3 ? 0.50 : 0.25; + double calculatedMultiplier = Math.min((outputMultiplierSlope * seed) + 1, outputMultiplierCap); int outputSize = (int) Math.floor(currentOutput.stackSize * calculatedMultiplier); return new ItemStack[] { copyAmountUnsafe(outputSize, currentOutput) }; } @@ -348,11 +352,16 @@ protected MultiblockTooltipBuilder createTooltip() { tt.addMachineType("Solar Factory") .addInfo("Controller block for the Solar Factory") .addInfo("Produces solar panels in bulk") - .addInfo("Receives a 25% bonus to output for each Wafer tier above the minimum required") - .addInfo("The bonus to output occurs after parallels, and cannot be greater than 100%") - .addInfo("The recipes shown in NEI display the minimum wafer tier required") - .addInfo("Parallels are based on Precise Casing Tier") - .addInfo("MK-I = 8x, MK-II = 16x, MK-III = 32x, MK-IV = 64x") + .addInfo("The structure has 3 tiers, each allowing greater production than the last") + .addInfo(WHITE + "" + BOLD + "Tier " + AQUA + BOLD + "2" + WHITE + BOLD + " and above:") + .addInfo(" 25% more outputs for every Wafer tier used above the minimum required") + .addInfo(" The bonus to output occurs after parallels, and cannot be greater than 100%") + .addInfo(" The recipes shown in NEI display the minimum wafer tier required") + .addInfo(" Parallels are based on Precise Casing Tier") + .addInfo(" MK-I = 8x, MK-II = 16x, MK-III = 32x, MK-IV = 64x") + .addInfo(WHITE + "" + BOLD + "Tier " + AQUA + BOLD + "3" + WHITE + BOLD + " and above:") + .addInfo(" Solar Panels can be made without the previous panel, but at a higher cost") + .addInfo(" Bonus per increased wafer tier is raised to 50%") .addTecTechHatchInfo() .beginStructureBlock(7, 10, 9, true) .addStructureInfo(WHITE + "Imprecise Unit Casings cannot be used")