From b869b3221670e40a84a7731257b73432509075fe Mon Sep 17 00:00:00 2001 From: Gate Guardian <147252672+qwer523@users.noreply.github.com> Date: Mon, 19 Aug 2024 03:45:52 +0800 Subject: [PATCH] Fixes Dual Output Hatch Tooltips (#1767) --- .../resources/assets/gtceu/lang/en_ud.json | 4 ++-- .../resources/assets/gtceu/lang/en_us.json | 4 ++-- .../gregtechceu/gtceu/common/data/GTMachines.java | 13 +++++++------ .../multiblock/part/DualHatchPartMachine.java | 1 + .../gregtechceu/gtceu/data/lang/MachineLang.java | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index a2c2036c21..6019654a36 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -2952,8 +2952,6 @@ "gtceu.machine.bedrock_ore_miner.production": "pǝʞɔoןɔɹǝʌo xɟ% 'x%dɟ§ :ɹǝıןdıʇןnW uoıʇɔnpoɹԀǝ§", "gtceu.machine.block_breaker.speed_bonus": "%d%%ɟ§ :snuoᗺ pǝǝdSǝ§", "gtceu.machine.block_breaker.tooltip": "sdoɹp sʇı sʇɔǝןןoɔ puɐ ǝɔɐɟ ʇuoɹɟ uo ʞɔoןq sǝuıWㄥ§", - "gtceu.machine.buffer.export.tooltip": "sʞɔoןqıʇןnW ɹoɟ ʇndʇnO pınןℲ puɐ ɯǝʇI", - "gtceu.machine.buffer.import.tooltip": "sʞɔoןqıʇןnW ɹoɟ ʇnduI pınןℲ puɐ ɯǝʇI", "gtceu.machine.buffer.tooltip": "spınןℲ puɐ sɯǝʇI ǝɹoʇs oʇ ɹǝɟɟnᗺ ןןɐɯS Ɐ", "gtceu.machine.canner.jei_description": ")sןןǝƆ pınןℲ ɹo sʇǝʞɔnᗺ ˙b˙ǝ( ɹǝuuɐƆ pınןℲ ǝɥʇ ɥʇıʍ sɹǝuıɐʇuoɔ pınןɟ ʎuɐ ʎʇdɯǝ puɐ ןןıɟ uɐɔ noʎ", "gtceu.machine.central_monitor.tooltip": "¿ɯooᗡ unɹ ʇı uɐɔ ʇnᗺ", @@ -2997,6 +2995,8 @@ "gtceu.machine.distillation_tower.tooltip": "ʎɹǝuıɟǝᴚ pınןℲ", "gtceu.machine.drum.disable_output": "pınןℲ uıɐɹp ʇou ןןıM", "gtceu.machine.drum.enable_output": "sʞuɐ⟘ ʇuǝɔɐظpɐ pɹɐʍuʍop oʇ pınןℲ uıɐɹp ןןıM", + "gtceu.machine.dual_hatch.export.tooltip": "sʞɔoןqıʇןnW ɹoɟ ʇndʇnO pınןℲ puɐ ɯǝʇI", + "gtceu.machine.dual_hatch.import.tooltip": "sʞɔoןqıʇןnW ɹoɟ ʇnduI pınןℲ puɐ ɯǝʇI", "gtceu.machine.electric_blast_furnace.tooltip": "¿ɹǝʞoɯs ɔıɹʇɔǝןǝ ǝɥʇ s,ǝɹǝɥM", "gtceu.machine.electric_blast_furnace.tooltip.0": "˙buıʞɔoןɔɹǝʌo-ǝɹd pǝıןddɐ sı ɹǝıןdıʇןnɯ ʎbɹǝuǝ ㄥ§%%ϛ6ɟ§ ǝʌıʇɐɔıןdıʇןnɯ ɐ 'ǝɹnʇɐɹǝdɯǝʇ ǝdıɔǝɹ ǝɥʇ ǝʌoqɐ ㄥ§ʞ006ɟ§ ʎɹǝʌǝ ɹoℲ", "gtceu.machine.electric_blast_furnace.tooltip.1": "˙)ʞɔoןɔɹǝʌo ʇɔǝɟɹǝd( ㄥ§ʇuǝıɔıɟɟǝ %%00Ɩɟ§ sǝɯoɔǝq ʞɔoןɔɹǝʌo ǝuo 'ǝɹnʇɐɹǝdɯǝʇ ǝdıɔǝɹ ǝɥʇ ǝʌoqɐ ㄥ§ʞ008Ɩɟ§ ʎɹǝʌǝ ɹoℲ", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 9178df9c2c..4c4ac1d0b2 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -2952,8 +2952,6 @@ "gtceu.machine.bedrock_ore_miner.production": "§eProduction Multiplier: §f%dx, %fx overclocked", "gtceu.machine.block_breaker.speed_bonus": "§eSpeed Bonus: §f%d%%", "gtceu.machine.block_breaker.tooltip": "§7Mines block on front face and collects its drops", - "gtceu.machine.buffer.export.tooltip": "Item and Fluid Output for Multiblocks", - "gtceu.machine.buffer.import.tooltip": "Item and Fluid Input for Multiblocks", "gtceu.machine.buffer.tooltip": "A Small Buffer to store Items and Fluids", "gtceu.machine.canner.jei_description": "You can fill and empty any fluid containers with the Fluid Canner (e.g. Buckets or Fluid Cells)", "gtceu.machine.central_monitor.tooltip": "But can it run Doom?", @@ -2997,6 +2995,8 @@ "gtceu.machine.distillation_tower.tooltip": "Fluid Refinery", "gtceu.machine.drum.disable_output": "Will not drain Fluid", "gtceu.machine.drum.enable_output": "Will drain Fluid to downward adjacent Tanks", + "gtceu.machine.dual_hatch.export.tooltip": "Item and Fluid Output for Multiblocks", + "gtceu.machine.dual_hatch.import.tooltip": "Item and Fluid Input for Multiblocks", "gtceu.machine.electric_blast_furnace.tooltip": "Where's the electric smoker?", "gtceu.machine.electric_blast_furnace.tooltip.0": "For every §f900K§7 above the recipe temperature, a multiplicative §f95%%§7 energy multiplier is applied pre-overclocking.", "gtceu.machine.electric_blast_furnace.tooltip.1": "For every §f1800K§7 above the recipe temperature, one overclock becomes §f100%% efficient§7 (perfect overclock).", diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 17d7601fca..5755013844 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -1115,14 +1115,15 @@ public static BiConsumer> createTankTooltips(String n new PartAbility[] { PartAbility.IMPORT_ITEMS }) .overlayTieredHullRenderer("dual_hatch.import") .tooltips( - Component.translatable("gtceu.machine.buffer.import.tooltip"), + Component.translatable("gtceu.machine.dual_hatch.import.tooltip"), Component.translatable( "gtceu.universal.tooltip.item_storage_capacity", (int) Math.pow((tier - 4), 2)), Component.translatable( "gtceu.universal.tooltip.fluid_storage_capacity_mult", (tier - 4), - DualHatchPartMachine.INITIAL_TANK_CAPACITY * (1L << (tier - 6))), + DualHatchPartMachine.getTankCapacity(DualHatchPartMachine.INITIAL_TANK_CAPACITY, + tier)), Component.translatable("gtceu.universal.enabled")) .compassNode("dual_hatch") .register(), @@ -1139,14 +1140,14 @@ public static BiConsumer> createTankTooltips(String n new PartAbility[] { PartAbility.EXPORT_ITEMS }) .overlayTieredHullRenderer("dual_hatch.export") .tooltips( - Component.translatable("gtceu.machine.buffer.export.tooltip"), + Component.translatable("gtceu.machine.dual_hatch.export.tooltip"), Component.translatable( "gtceu.universal.tooltip.item_storage_capacity", - (1 + Math.min(9, tier)) * (1 + Math.min(9, tier))), + (int) Math.pow((tier - 4), 2)), Component.translatable( "gtceu.universal.tooltip.fluid_storage_capacity_mult", - 1 + Math.min(9, tier), - FluidHatchPartMachine.getTankCapacity( + (tier - 4), + DualHatchPartMachine.getTankCapacity( DualHatchPartMachine.INITIAL_TANK_CAPACITY, tier)), Component.translatable("gtceu.universal.enabled")) .compassNode("dual_hatch") diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/DualHatchPartMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/DualHatchPartMachine.java index 0dfaa91b84..a7cd048164 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/DualHatchPartMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/DualHatchPartMachine.java @@ -53,6 +53,7 @@ public static long getTankCapacity(long initialCapacity, int tier) { return initialCapacity * (1L << (tier - 6)); } + @Override public int getInventorySize() { return (int) Math.pow((getTier() - 4), 2); } diff --git a/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java b/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java index b9312b4a04..7919f7f923 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java +++ b/src/main/java/com/gregtechceu/gtceu/data/lang/MachineLang.java @@ -748,8 +748,8 @@ protected static void init(RegistrateLangProvider provider) { provider.add("gui.gtceu.rename.desc", "Rename Pattern Buffer"); provider.add("gui.gtceu.refund_all.desc", "Return Stored Contents to AE2"); - provider.add("gtceu.machine.buffer.import.tooltip", "Item and Fluid Input for Multiblocks"); - provider.add("gtceu.machine.buffer.export.tooltip", "Item and Fluid Output for Multiblocks"); + provider.add("gtceu.machine.dual_hatch.import.tooltip", "Item and Fluid Input for Multiblocks"); + provider.add("gtceu.machine.dual_hatch.export.tooltip", "Item and Fluid Output for Multiblocks"); provider.add("gtceu.machine.energy_hatch.input.tooltip", "Energy Input for Multiblocks"); provider.add("gtceu.machine.energy_hatch.input_hi_amp.tooltip", "Multiple Ampere Energy Input for Multiblocks");