diff --git a/src/main/java/gregtech/common/covers/CoverConveyor.java b/src/main/java/gregtech/common/covers/CoverConveyor.java index 2dfbe0dd565..6c4e9225003 100644 --- a/src/main/java/gregtech/common/covers/CoverConveyor.java +++ b/src/main/java/gregtech/common/covers/CoverConveyor.java @@ -586,12 +586,12 @@ protected ParentWidget createUI(ModularPanel mainPanel, GuiSyncManager g .initUI(mainPanel, guiSyncManager)) .child(new EnumRowBuilder<>(ManualImportExportMode.class) .value(manualIOmode) - .lang("Manual IO Mode") + .lang("cover.generic.manual_io") .overlay(GTGuiTextures.MANUAL_IO_OVERLAY) .build()) .child(new EnumRowBuilder<>(ConveyorMode.class) .value(conveyorMode) - .lang("Conveyor Mode") + .lang("cover.conveyor.mode") .overlay(GTGuiTextures.CONVEYOR_MODE_OVERLAY) .build()); } diff --git a/src/main/java/gregtech/common/covers/CoverFluidRegulator.java b/src/main/java/gregtech/common/covers/CoverFluidRegulator.java index 678faa01eb9..7acc3e1f4e2 100644 --- a/src/main/java/gregtech/common/covers/CoverFluidRegulator.java +++ b/src/main/java/gregtech/common/covers/CoverFluidRegulator.java @@ -341,7 +341,7 @@ protected ParentWidget createUI(ModularPanel mainPanel, GuiSyncManager syncMa return super.createUI(mainPanel, syncManager) .child(new EnumRowBuilder<>(TransferMode.class) .value(transferMode) - .lang("Transfer Mode") + .lang("cover.generic.transfer_mode") .overlay(GTGuiTextures.TRANSFER_MODE_OVERLAY) .build()) .child(new EnumRowBuilder<>(BucketMode.class) diff --git a/src/main/java/gregtech/common/covers/CoverPump.java b/src/main/java/gregtech/common/covers/CoverPump.java index f68c9648f39..befe8b58192 100644 --- a/src/main/java/gregtech/common/covers/CoverPump.java +++ b/src/main/java/gregtech/common/covers/CoverPump.java @@ -314,12 +314,12 @@ protected ParentWidget createUI(ModularPanel mainPanel, GuiSyncManager syncMa .initUI(mainPanel, syncManager)) .child(new EnumRowBuilder<>(ManualImportExportMode.class) .value(manualIOmode) - .lang("Manual IO") + .lang("cover.generic.manual_io") .overlay(GTGuiTextures.MANUAL_IO_OVERLAY) .build()) .child(new EnumRowBuilder<>(PumpMode.class) .value(pumpMode) - .lang("Pump Mode") + .lang("cover.pump.mode") .overlay(GTGuiTextures.CONVEYOR_MODE_OVERLAY) // todo pump mode overlays .build()); } diff --git a/src/main/java/gregtech/common/covers/CoverRoboticArm.java b/src/main/java/gregtech/common/covers/CoverRoboticArm.java index 97336b877c7..01d813ca755 100644 --- a/src/main/java/gregtech/common/covers/CoverRoboticArm.java +++ b/src/main/java/gregtech/common/covers/CoverRoboticArm.java @@ -210,7 +210,7 @@ protected ParentWidget createUI(ModularPanel mainPanel, GuiSyncManager g return super.createUI(mainPanel, guiSyncManager) .child(new EnumRowBuilder<>(TransferMode.class) .value(transferMode) - .lang("Transfer Mode") + .lang("cover.generic.transfer_mode") .overlay(GTGuiTextures.TRANSFER_MODE_OVERLAY) .build()) .child(new Row().right(0).coverChildrenHeight() diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java index a59e30c805b..27d3b7eaa9d 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java @@ -57,20 +57,23 @@ protected void addProbeInfo(@NotNull CoverHolder capability, @NotNull IProbeInfo * @param conveyor the conveyor to get data from */ private static void conveyorInfo(@NotNull IProbeInfo probeInfo, @NotNull CoverConveyor conveyor) { - String rateUnit = " {*cover.conveyor.transfer_rate*}"; + String rateUnit = IProbeInfo.STARTLOC + "{*cover.conveyor.transfer_rate*}" + IProbeInfo.ENDLOC; if (conveyor instanceof CoverItemVoiding) { itemVoidingInfo(probeInfo, (CoverItemVoiding) conveyor); - } else if (!(conveyor instanceof CoverRoboticArm) || - ((CoverRoboticArm) conveyor).getTransferMode() == TransferMode.TRANSFER_ANY) { + } else if (!(conveyor instanceof CoverRoboticArm arm) || + arm.getTransferMode() == TransferMode.TRANSFER_ANY) { // only display the regular rate if the cover does not have a specialized rate - transferRateText(probeInfo, conveyor.getConveyorMode(), rateUnit, conveyor.getTransferRate()); - } + transferRateText(probeInfo, conveyor.getConveyorMode(), " " + rateUnit, conveyor.getTransferRate()); + } ItemFilterContainer filter = conveyor.getItemFilterContainer(); if (conveyor instanceof CoverRoboticArm roboticArm) { - transferModeText(probeInfo, roboticArm.getTransferMode(), rateUnit, filter.getTransferSize(), - filter.getFilter() != null); + if (roboticArm.getTransferMode() != TransferMode.TRANSFER_ANY) + rateUnit = IProbeInfo.STARTLOC + "{*cover.robotic_arm.exact*}" + IProbeInfo.ENDLOC; + + transferModeText(probeInfo, roboticArm.getTransferMode(), rateUnit, + filter.getTransferSize(), filter.getFilter() != null); } itemFilterText(probeInfo, filter.getFilter()); } @@ -99,12 +102,13 @@ private static void itemVoidingInfo(@NotNull IProbeInfo probeInfo, @NotNull Cove * @param pump the pump to get data from */ private static void pumpInfo(@NotNull IProbeInfo probeInfo, @NotNull CoverPump pump) { - String rateUnit = IProbeInfo.STARTLOC + pump.getBucketMode().getName() + IProbeInfo.ENDLOC; + String rateUnit = IProbeInfo.STARTLOC + (pump.getBucketMode() == CoverPump.BucketMode.BUCKET ? + "{*cover.bucket.mode.bucket_rate*}" : "{*cover.bucket.mode.milli_bucket_rate*}") + IProbeInfo.ENDLOC; if (pump instanceof CoverFluidVoiding) { fluidVoidingInfo(probeInfo, (CoverFluidVoiding) pump); - } else if (!(pump instanceof CoverFluidRegulator) || - ((CoverFluidRegulator) pump).getTransferMode() == TransferMode.TRANSFER_ANY) { + } else if (!(pump instanceof CoverFluidRegulator regulator) || + regulator.getTransferMode() == TransferMode.TRANSFER_ANY) { // do not display the regular rate if the cover has a specialized rate transferRateText(probeInfo, pump.getPumpMode(), " " + rateUnit, pump.getBucketMode() == CoverPump.BucketMode.BUCKET ? pump.getTransferRate() / 1000 : @@ -113,8 +117,12 @@ private static void pumpInfo(@NotNull IProbeInfo probeInfo, @NotNull CoverPump p FluidFilterContainer filter = pump.getFluidFilterContainer(); if (pump instanceof CoverFluidRegulator regulator) { - transferModeText(probeInfo, regulator.getTransferMode(), rateUnit, regulator.getTransferAmount(), - filter.getFilterWrapper().getFluidFilter() != null); + if (regulator.getTransferMode() != TransferMode.TRANSFER_ANY) + rateUnit = IProbeInfo.STARTLOC + (regulator.getBucketMode() == CoverPump.BucketMode.BUCKET ? + "{*cover.bucket.mode.bucket_exact*}" : "{*cover.bucket.mode.milli_bucket_exact*}") + IProbeInfo.ENDLOC; + + transferModeText(probeInfo, regulator.getTransferMode(), rateUnit, regulator + .getFluidFilterContainer().getTransferSize(), filter.hasFilter()); } fluidFilterText(probeInfo, filter.getFilterWrapper().getFluidFilter()); } @@ -197,7 +205,6 @@ private static void transferRateText(@NotNull IProbeInfo probeInfo, @NotNull IIO * * @param probeInfo the info to add the text to * @param mode the transfer mode of the cover - * @param rateUnit the unit of what is transferred * @param rate the transfer rate of the mode * @param hasFilter whether the cover has a filter installed */ @@ -205,7 +212,8 @@ private static void transferModeText(@NotNull IProbeInfo probeInfo, @NotNull Tra @NotNull String rateUnit, int rate, boolean hasFilter) { String text = TextStyleClass.OK + IProbeInfo.STARTLOC + mode.getName() + IProbeInfo.ENDLOC; if (!hasFilter && mode != TransferMode.TRANSFER_ANY) - text += TextStyleClass.LABEL + " " + TextFormattingUtil.formatNumbers(rate) + rateUnit; + text += TextStyleClass.LABEL + " " + TextFormattingUtil.formatNumbers(rate) + " " + rateUnit; + probeInfo.text(text); } diff --git a/src/main/resources/assets/gregtech/lang/en_us.lang b/src/main/resources/assets/gregtech/lang/en_us.lang index 4f6a577e686..2cb947606ef 100644 --- a/src/main/resources/assets/gregtech/lang/en_us.lang +++ b/src/main/resources/assets/gregtech/lang/en_us.lang @@ -1272,6 +1272,10 @@ cover.smart_item_filter.filtering_mode.centrifuge=Centrifuge cover.smart_item_filter.filtering_mode.sifter=Sifter cover.smart_item_filter.filtering_mode.description=Select Machine this Smart Filter will use for filtering./nIt will automatically pick right portions of items for robotic arm. +cover.generic.transfer_mode=Transfer Mode +cover.generic.manual_io=Manual IO Mode +cover.conveyor.mode=Conveyor Mode +cover.pump.mode=Pump Mode cover.conveyor.title=Conveyor Cover Settings (%s) cover.conveyor.transfer_rate=§7items/sec cover.conveyor.mode.export=Mode: Export @@ -1289,6 +1293,7 @@ cover.conveyor.item_filter.title=Item Filter cover.conveyor.ore_dictionary.title=Ore Dictionary Name cover.conveyor.ore_dictionary.title2=(use * for wildcard) cover.robotic_arm.title=Robotic Arm Settings (%s) +cover.robotic_arm.exact=§7items cover.robotic_arm.transfer_mode.transfer_any=Transfer Any cover.robotic_arm.transfer_mode.transfer_exact=Supply Exact cover.robotic_arm.transfer_mode.keep_exact=Keep Exact @@ -1299,8 +1304,12 @@ cover.pump.transfer_rate=%s cover.pump.mode.export=Mode: Export cover.pump.mode.import=Mode: Import cover.pump.fluid_filter.title=Fluid Filter -cover.bucket.mode.bucket=kL/s -cover.bucket.mode.milli_bucket=L/s +cover.bucket.mode.bucket=Bucket Mode: kL +cover.bucket.mode.milli_bucket=Bucket Mode: L +cover.bucket.mode.bucket_rate=kL/s +cover.bucket.mode.bucket_exact=kL +cover.bucket.mode.milli_bucket_rate=L/s +cover.bucket.mode.milli_bucket_exact=L cover.fluid_regulator.title=Fluid Regulator Settings (%s) cover.fluid_regulator.transfer_mode.description=§eTransfer Any§r - in this mode, cover will transfer as many fluids matching its filter as possible./n§eSupply Exact§r - in this mode, cover will supply fluids in portions specified in the window underneath this button. If amount of fluids is less than portion size, fluids won't be moved./n§eKeep Exact§r - in this mode, cover will keep specified amount of fluids in the destination inventory, supplying additional amount of fluids if required./n§7Tip: shift click will multiply increase/decrease amounts by 10 and ctrl click will multiply by 100. cover.fluid_regulator.supply_exact=Supply Exact: %s