From 60deb9882e6d46a0fc25270bf8e4b3af388f8498 Mon Sep 17 00:00:00 2001 From: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Date: Mon, 3 Oct 2022 10:25:16 +0100 Subject: Add additional number formatting to GT5u and fix localisation issue with volumetric flasks (#1431) * Format large cells. * Add number formatting and fix localisation issue. * Add number formatting for radioactive cells. * Add number formatting for coal boiler. * Add number formatting for GT turbine items. * Add number formatting for GT credits. * Add number formatting for breeder cells. * spotlessApply (#1432) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../machines/multi/GT_MetaTileEntity_LargeBoiler.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index dcf044c8b3..784e81f1ba 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -12,6 +12,7 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_GLOW; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_Utility.formatNumbers; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -101,21 +102,22 @@ public abstract class GT_MetaTileEntity_LargeBoiler // Tooltip differs between the boilers that output Superheated Steam (Titanium and Tungstensteel) and the ones // that do not (Bronze and Steel) if (isSuperheated()) { - tt.addInfo("Produces " + (getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam) - + "L of Superheated Steam with 1 Coal at " + (getEUt() * 40) / superToNormalSteam + tt.addInfo("Produces " + formatNumbers((getEUt() * 40) * ((runtimeBoost(20) / (20f)) / superToNormalSteam)) + + "L of Superheated Steam with 1 Coal at " + + formatNumbers((getEUt() * 40L) / superToNormalSteam) + "L/s") // ? .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)") .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!"); } else { - tt.addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " - + getEUt() * 40 + "L/s") // ? + tt.addInfo("Produces " + formatNumbers((getEUt() * 40) * (runtimeBoost(20) / 20f)) + + "L of Steam with 1 Coal at " + formatNumbers(getEUt() * 40) + "L/s") // ? .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") .addInfo("Solid Fuels with a burn value that is too high or too low will not work"); } tt.addInfo(String.format( - "Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", - 500.0 / getEfficiencyIncrease())) // ? check semifluid again + "Diesel fuels have 1/4 efficiency - Takes %s seconds to heat up", + formatNumbers(500.0 / getEfficiencyIncrease()))) // ? check semifluid again .addPollutionAmount(getPollutionPerSecond(null)) .addSeparator() .beginStructureBlock(3, 5, 3, false) -- cgit