Skip to content

Commit

Permalink
Add tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
FourIsTheNumber committed Nov 14, 2024
1 parent df50073 commit 3027cda
Show file tree
Hide file tree
Showing 38 changed files with 64 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package bartworks.common.tileentities.multis;

import static bartworks.common.loaders.ItemRegistry.BW_BLOCKS;
import static bartworks.util.BWTooltipReference.TT;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
Expand Down Expand Up @@ -269,7 +268,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Tier is determined by containment block")
.addInfo("Valid blocks: Neutronium, Infinity, Transcendent Metal, Spacetime, Universium")
.addInfo("Minimum allowed energy hatch tier is one below recipe tier")
.addInfo("Supports " + TT + " energy hatches")
.addTecTechHatch()
.beginStructureBlock(3, 9, 3, false)
.addController("Front 3rd layer center")
.addCasingInfoMin("Solid Steel Machine Casing", 8, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,13 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType("Blast Furnace")
.addInfo("Processes up to 256 recipes at once")
.addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus")
.addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)")
.addInfo("Each 1800K over the min. Heat allows for an overclock to be upgraded to a perfect overclock.")
.addInfo("That means the EBF will reduce recipe time by a factor 4 instead of 2 (giving 100% efficiency).")
.addInfo("Additionally gives +100K for every tier past MV")
.addTecTechHatch()
.addInfo(
GTValues.TIER_COLORS[8] + GTValues.VN[8]
+ EnumChatFormatting.GRAY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public MultiblockTooltipBuilder createTooltip() {
tt.addMachineType("Chemical Reactor")
.addInfo("What molecule do you want to synthesize ?")
.addInfo("Or you want to replace something in this molecule ?")
.addInfo("Processes up to 256 recipes at once")
.addTecTechHatch()
.addInfo(
GTValues.TIER_COLORS[8] + GTValues.VN[8]
+ EnumChatFormatting.GRAY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,10 @@ public int getRecipeCatalystPriority() {
protected MultiblockTooltipBuilder createTooltip() {
final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType("Distillery")
.addInfo("Processes up to 256 recipes at once")
.addInfo("Fluids are only put out at the correct height")
.addInfo("The correct height equals the slot number in the NEI recipe")
.addTecTechHatch()
.beginVariableStructureBlock(15, 15, 16, 56, 15, 15, true)
.addController("Front bottom")
.addOtherStructurePart("Clean Stainless Steel Machine Casing", "15 x h - 5 (minimum)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@ public MTEMegaOilCracker(String aName) {
public MultiblockTooltipBuilder createTooltip() {
final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType("Cracker")
.addInfo("Processes up to 256 recipes at once")
.addInfo("Thermally cracks heavy hydrocarbons into lighter fractions")
.addInfo("More efficient than the Chemical Reactor")
.addInfo("Gives different benefits whether it hydro or steam-cracks:")
.addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
.addInfo("Steam - Outputs 50% more cracked fluid")
.addInfo("(Values compared to cracking in the Chemical Reactor)")
.addInfo("Place the appropriate circuit in the controller or an input bus")
.addTecTechHatch()
.addInfo(
GTValues.TIER_COLORS[8] + GTValues.VN[8]
+ EnumChatFormatting.GRAY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType("Vacuum Freezer")
.addInfo("Cools hot ingots and cells")
.addInfo("Processes up to 256 recipes at once")
.addTecTechHatch()
.addSeparator()
.addInfo("Upgrade to Tier 2 to unlock " + EnumChatFormatting.LIGHT_PURPLE + "Subspace Cooling.")
.addInfo(
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/ggfab/mte/MTEAdvAssLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Assembling Line with item pipelining")
.addInfo("All fluids are however consumed at start")
.addInfo("Use voltage of worst energy hatch for overclocking")
.addInfo("Perform normal overclock with given voltage")
.addInfo("Perform laser overclock with extra amperages from multi-amp energy hatches")
.addInfo("Performs normal overclock with given voltage")
.addTecTechHatch()
.addInfo("Performs laser overclock with extra amperage from multi-amp energy hatches")
.addInfo("Each laser overclock reduces recipe time by 50%")
.addInfo(
"and multiplies power by (4 + " + formatNumbers(LASER_OVERCLOCK_PENALTY_FACTOR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ protected MultiblockTooltipBuilder createTooltip() {
+ " laser and multi-amp hatches!")
.addInfo("Supports overclocking beyond MAX!")
.addInfo(EnumChatFormatting.ITALIC + "Much more efficient than other competing brands!")
.addTecTechHatch()
.beginStructureBlock(9, 10, 33, false)
.addOtherStructurePart("Borosilicate Glass", "Can be UV tier or higher")
.addInputBus("Start of conveyor belt", 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Produces naquadah fuels.")
.addInfo("Needs field restriction coils to control the fatal radiation.")
.addInfo("Use higher tier coils to unlock more fuel types and reduce the processing times.")
.addTecTechHatch()
.beginStructureBlock(3, 15, 15, false)
.addInputHatch("The casings adjacent to field restriction glass.")
.addInputBus("The casings adjacent to field restriction glass.", 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Max parallel dictated by structure size and Essentia Diffusion Cell tier")
.addInfo("Energy Hatch tier: HV+")
.addInfo("You can find more information about this machine in the Thaumonomicon.")
.addTecTechHatch()
.addPollutionAmount(getPollutionPerSecond(null))
.addController("Front center")
.addCasingInfoMin("Magic Casing", 24, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.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(
"Support" + EnumChatFormatting.BLUE
+ " Tec"
+ EnumChatFormatting.DARK_BLUE
+ "Tech"
+ EnumChatFormatting.GRAY
+ " Energy/Laser Hatches!")
.addTecTechHatch()
.addCasingInfoMin("LuV Machine Casing", 1664, false)
.addCasingInfoMin("Ameliorated Superconduct Coil", 560, false)
.addCasingInfoMin("Naquadah Alloy Frame Boxes", 128, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("chunk area of the ring center (not controller).")
.addInfo("Startup < 160,000,000 EU: 128x Parallel")
.addInfo("Startup >= 160,000,000 EU: 64x Parallel")
.addInfo(
"Support" + EnumChatFormatting.BLUE
+ " Tec"
+ EnumChatFormatting.DARK_BLUE
+ "Tech"
+ EnumChatFormatting.GRAY
+ " Energy/Laser Hatches!")
.addTecTechHatch()
.addCasingInfoMin("Fusion Machine Casing", 1664, false)
.addCasingInfoMin("Compact Fusion Coil", 560, false)
.addCasingInfoMin("Duranium Frame Box", 128, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Startup < 160,000,000 EU: 192x Parallel")
.addInfo("Startup < 320,000,000 EU: 128x Parallel")
.addInfo("Startup >= 320,000,000 EU: 64x Parallel")
.addInfo(
"Support" + EnumChatFormatting.BLUE
+ " Tec"
+ EnumChatFormatting.DARK_BLUE
+ "Tech"
+ EnumChatFormatting.GRAY
+ " Energy/Laser Hatches!")
.addTecTechHatch()
.addCasingInfoMin("Fusion Machine Casing MK II", 1664, false)
.addCasingInfoMin("Advanced Compact Fusion Coil", 560, false)
.addCasingInfoMin("Neutronium Frame Box", 128, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Startup < 320,000,000 EU: 192x Parallel")
.addInfo("Startup < 640,000,000 EU: 128x Parallel")
.addInfo("Startup >= 640,000,000 EU: 64x Parallel")
.addInfo(
"Support" + EnumChatFormatting.BLUE
+ " Tec"
+ EnumChatFormatting.DARK_BLUE
+ "Tech"
+ EnumChatFormatting.GRAY
+ " Energy/Laser Hatches!")
.addTecTechHatch()
.addCasingInfoMin("Fusion Machine Casing MK III", 1664, false)
.addCasingInfoMin("Compact Fusion Coil MK-II Prototype", 560, false)
.addCasingInfoMin("Infinity Catalyst Frame Box", 128, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Startup < 640,000,000 EU: 192x Parallel")
.addInfo("Startup < 1,200,000,000 EU: 128x Parallel")
.addInfo("Startup >= 1,200,000,000 EU: 64x Parallel")
.addInfo(
"Support" + EnumChatFormatting.BLUE
+ " Tec"
+ EnumChatFormatting.DARK_BLUE
+ "Tech"
+ EnumChatFormatting.GRAY
+ " Energy/Laser Hatches!")
.addTecTechHatch()
.addCasingInfoMin("Fusion Machine Casing MK IV", 1664, false)
.addCasingInfoMin("Compact Fusion Coil MK-II Finaltype", 560, false)
.addCasingInfoMin("Infinity Frame Box", 128, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo(String.format("Molten Naquadah | %dx power | 20 L/s", ExcitedLiquidCoe[2]))
.addInfo(String.format("Molten Atomic Separation Catalyst | %dx power | 20 L/s", ExcitedLiquidCoe[1]))
.addInfo(String.format("Spatially Enlarged Fluid | %dx power | 20 L/s", ExcitedLiquidCoe[0]))
.addTecTechHatch()
.beginStructureBlock(7, 8, 7, true)
.addController("Front bottom")
.addDynamoHatch("Any bottom layer casing, only accept ONE!")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package goodgenerator.blocks.tileEntity;

import static bartworks.util.BWTooltipReference.TT;
import static bartworks.util.BWUtil.ofGlassTieredMixed;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.HatchElement.*;
Expand Down Expand Up @@ -342,7 +341,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("But gives more parallel with more advanced one.")
.addInfo("It is 100% faster in Normal Mode.")
.addInfo("Imprecise (MK-0) = 16x, MK-I = 32x, MK-II = 64x, MK-III = 128x, MK-IV = 256x")
.addInfo("Supports " + TT + " energy hatches")
.addTecTechHatch()
.addPollutionAmount(getPollutionPerSecond(null))
.beginStructureBlock(9, 5, 5, true)
.addController("Front bottom")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,10 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("You need to supply Combustion Promoter to keep it running.")
.addInfo("It will consume all the fuel and promoter in the hatch every second.")
.addInfo("If the Dynamo Hatch's buffer fills up, the machine will stop.")
.addInfo("When turned on, there's 10-second period where the machine will not stop.")
.addInfo("When turned on, there is a 10-second period where the machine will not stop.")
.addInfo("Even if it doesn't stop, all the fuel in the hatch will be consumed.")
.addInfo("The efficiency is determined by the proportion of Combustion Promoter to fuel.")
.addInfo("The proportion is bigger, and the efficiency will be higher.")
.addInfo("Start machine with power button to force structure check.")
.addInfo("It creates sqrt(Current Output Power) pollution every second")
.addInfo(
"If you forget to supply Combustion Promoter, this engine will swallow all the fuel "
Expand All @@ -199,6 +198,7 @@ protected MultiblockTooltipBuilder createTooltip() {
+ EnumChatFormatting.GRAY
+ ".")
.addInfo("The efficiency is up to 150%.")
.addTecTechHatch()
.beginStructureBlock(5, 4, 9, false)
.addMaintenanceHatch("Hint block with dot 1")
.addMufflerHatch("Hint block with dot 2 (fill all slots with mufflers)")
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/gregtech/api/enums/GTValues.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gregtech.api.enums;

import static bartworks.util.BWTooltipReference.TT;
import static com.gtnewhorizon.gtnhlib.util.AnimatedTooltipHandler.AQUA;
import static com.gtnewhorizon.gtnhlib.util.AnimatedTooltipHandler.BOLD;
import static com.gtnewhorizon.gtnhlib.util.AnimatedTooltipHandler.DARK_AQUA;
Expand Down Expand Up @@ -685,6 +686,8 @@ public static final class NBT {

public static final String AuthorPineapple = "Author: " + EnumChatFormatting.BLUE + "Recursive Pineapple";

public static final String TecTechHatches = "Supports " + TT + " laser and multi-amp hatches";

// 7.5F comes from GT_Tool_Turbine_Large#getBaseDamage() given huge turbines are the most efficient now.
public static double getMaxPlasmaTurbineEfficiencyFromMaterial(Materials material) {
return (5F + (7.5F + material.mToolQuality)) / 10.0;
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/gregtech/api/util/MultiblockTooltipBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class MultiblockTooltipBuilder {
private static final String TT_inputhatch = StatCollector.translateToLocal("GT5U.MBTT.InputHatch");
private static final String TT_outputbus = StatCollector.translateToLocal("GT5U.MBTT.OutputBus");
private static final String TT_outputhatch = StatCollector.translateToLocal("GT5U.MBTT.OutputHatch");
private static final String TT_tectechhatch = StatCollector.translateToLocal("GT5U.MBTT.TecTechHatch");
private static final String TT_causes = StatCollector.translateToLocal("GT5U.MBTT.Causes");
private static final String TT_pps = StatCollector.translateToLocal("GT5U.MBTT.PPS");
private static final String TT_hold = StatCollector.translateToLocal("GT5U.MBTT.Hold");
Expand Down Expand Up @@ -546,6 +547,17 @@ public MultiblockTooltipBuilder addOtherStructurePart(String name, String info,
return this;
}

/**
* Add a line of information about the structure:<br>
* Supports TecTech Multi-Amp and Laser Hatches!
*
* @return Instance this method was called on.
*/
public MultiblockTooltipBuilder addTecTechHatch() {
iLines.add(EnumChatFormatting.BLUE + TT_tectechhatch);
return this;
}

/**
* Add a line of information about the structure:<br>
* (indent)Maintenance Hatch: info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addSeparator()
.addInfo("If a recipe's tier is lower than the tier of the Nano Forge")
.addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".")
.addTecTechHatch()
.beginStructureBlock(30, 38, 13, false)
.addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY)
.addStructureInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.")
.addInfo("Thermosink uses 10 L/s of Super Coolant and enables perfect overclocks.")
.addInfo("Trace size can be changed to modify the material usage and machine speed.")
.addTecTechHatch()
.beginStructureBlock(30, 38, 13, false)
.addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1)
.addEnergyHatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ private void transferPower(long optimal, int index) {
long toSend = GTUtility.min(available, empty, maxSend, maxReceive, maxIO);

double overclocks = 0;

if (mAllowOverclocks) {
overclocks = Math.log((double)toSend / (double)optimal) / Math.log(4.0);
overclocks = MathHelper.clamp_double(overclocks, 0, MAX_OVERCLOCKS);
Expand Down Expand Up @@ -998,7 +998,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("Each laser target must have a laser source on the §oother§7 controller, on the §oopposite§7 side.")
.addInfo("Consumes an AE2 Singularity from an input bus each time the wormhole is kick-started.")
.addInfo("Right click the controller with a screwdriver to disable overclocking.")
.addInfo("Works with low power lasers.")
.addTecTechHatch()
.beginStructureBlock(7, 9, 7, false)
.addCasingInfoExactly("Molecular Casing", 2 * 12, false)
.addCasingInfoExactly("Europium Reinforced Radiation Proof Machine Casing", 4, false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package gregtech.common.tileentities.machines.multi.compressor;

import static bartworks.util.BWTooltipReference.TT;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
Expand Down Expand Up @@ -373,7 +372,7 @@ protected MultiblockTooltipBuilder createTooltip() {
+ " parallels when stability is BELOW "
+ EnumChatFormatting.RED
+ "50/20")
.addInfo("Accepts " + TT + " energy hatches")
.addTecTechHatch()
.addInfo(
EnumChatFormatting.RED
+ "Recipe tier is limited to hatch tier + 1. Will not perform overclocks above the hatch tier.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ protected MultiblockTooltipBuilder createTooltip() {
+ EnumChatFormatting.GRAY
+ " blocks along each axis.")
.addInfo("Left click this controller with a data stick, then right click a purification unit to link.")
.addInfo("Supplies power to linked purification units. This multiblock accepts TecTech energy hatches.")
.addInfo("Supplies power to linked purification units.")
.addTecTechHatch()
.addSeparator()
.addInfo(
"Works in fixed time processing cycles of " + EnumChatFormatting.RED
Expand Down
Loading

0 comments on commit 3027cda

Please sign in to comment.