From 1842f59eeb837edecfc31dae8a2b35fcda471b38 Mon Sep 17 00:00:00 2001 From: Mary <33456283+FourIsTheNumber@users.noreply.github.com> Date: Fri, 19 Jul 2024 12:27:40 -0400 Subject: Mode switch button (#2730) * Button textures. Once again I am manually pulling changes from a different branch... sorry. If you want to read the full commit history, the modeswitchgui branch has it. * Texture enums * Implementation in ControllerWithOptionalFeatures * Implementation in GT_MetaTileEntity_MultiBlockBase * Implemented into all multi-machines * Lang changes * Added documentation * Added missing clear * Quick polish changes - button base texture is standard instead of pressed, and the click noise works. * MFE compatibility * TurboCan compatibility * Fix misordered icons in canner * Removed redundant code in button * Attempted to refactor with MachineMode enum. Also moved loadNBT and saveNBT logic to base class * sa * fix (cherry picked from commit 1f14a7abf460ad114f10e8ba58b6be44b7b18d48) * Rework machineMode into enum of IMachineMode completely * Fixed breaking typo * Made it stop crashing on normal multis that don't support mode switch * Revert * Finished revert and re-addressed changes from original review * spotless * Load nbt tags in correct order. Fixes backwards compat * Check nbt key on load instead * Run super last and make all MACHINEMODE static --------- Co-authored-by: Martin Robertz --- src/main/resources/assets/gregtech/lang/en_US.lang | 13 +++++++------ .../textures/gui/overlay_button/machine_mode_bending.png | Bin 0 -> 571 bytes .../textures/gui/overlay_button/machine_mode_chembath.png | Bin 0 -> 564 bytes .../textures/gui/overlay_button/machine_mode_cutting.png | Bin 0 -> 644 bytes .../textures/gui/overlay_button/machine_mode_default.png | Bin 0 -> 590 bytes .../textures/gui/overlay_button/machine_mode_forming.png | Bin 0 -> 590 bytes .../gui/overlay_button/machine_mode_lpf_fluid.png | Bin 0 -> 574 bytes .../gui/overlay_button/machine_mode_lpf_metal.png | Bin 0 -> 586 bytes .../textures/gui/overlay_button/machine_mode_packager.png | Bin 0 -> 615 bytes .../gui/overlay_button/machine_mode_polarizer.png | Bin 0 -> 600 bytes .../gui/overlay_button/machine_mode_separator.png | Bin 0 -> 538 bytes .../gui/overlay_button/machine_mode_simplewasher.png | Bin 0 -> 564 bytes .../textures/gui/overlay_button/machine_mode_slicing.png | Bin 0 -> 543 bytes .../gui/overlay_button/machine_mode_unpackager.png | Bin 0 -> 618 bytes .../gui/overlay_button/machine_mode_washplant.png | Bin 0 -> 595 bytes 15 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_bending.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_chembath.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_cutting.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_default.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_forming.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_fluid.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_metal.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_packager.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_polarizer.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_separator.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_simplewasher.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_slicing.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_unpackager.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_washplant.png (limited to 'src/main/resources') diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index e529750871..9c62c6be6a 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -320,13 +320,13 @@ GT5U.machines.stalled_vent.tooltip.2=§7point this machine's steam GT5U.machines.stalled_vent.tooltip.3=§7vent towards an empty space. GT5U.GTPP_MULTI_ARC_FURNACE.mode.0=Electric GT5U.GTPP_MULTI_ARC_FURNACE.mode.1=Plasma -GT5U.GTPP_MULTI_CUTTING_MACHINE.mode.0=Slicing -GT5U.GTPP_MULTI_CUTTING_MACHINE.mode.1=Cutting +GT5U.GTPP_MULTI_CUTTING_MACHINE.mode.0=Cutting +GT5U.GTPP_MULTI_CUTTING_MACHINE.mode.1=Slicing GT5U.GTPP_MULTI_WASH_PLANT.mode.0=Ore Washer GT5U.GTPP_MULTI_WASH_PLANT.mode.1=Simple Washer GT5U.GTPP_MULTI_WASH_PLANT.mode.2=Chemical Bath -GT5U.GTPP_MULTI_INDUSTRIAL_PLATE_PRESS.mode.0=Forming Press -GT5U.GTPP_MULTI_INDUSTRIAL_PLATE_PRESS.mode.1=Bending +GT5U.GTPP_MULTI_INDUSTRIAL_PLATE_PRESS.mode.0=Bending +GT5U.GTPP_MULTI_INDUSTRIAL_PLATE_PRESS.mode.1=Forming Press GT5U.INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR.mode.0=Electromagnetic Separator GT5U.INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR.mode.1=Electromagnetic Polarizer GT5U.GTPP_MULTI_INDUSTRIAL_MULTI_MACHINE.mode.0=Metal @@ -342,8 +342,8 @@ GT5U.GTPP_MULTI_ADV_DISTILLATION_TOWER.mode.0=Distillation Tower GT5U.GTPP_MULTI_ADV_DISTILLATION_TOWER.mode.1=Distillery GT5U.GTPP_MULTI_PRECISE_ASSEMBLER.mode.0=Precise GT5U.GTPP_MULTI_PRECISE_ASSEMBLER.mode.1=Normal -GT5U.GTPP_MULTI_PACKAGER.mode.0=Unpackager -GT5U.GTPP_MULTI_PACKAGER.mode.1=Packager +GT5U.GTPP_MULTI_PACKAGER.mode.0=Packager +GT5U.GTPP_MULTI_PACKAGER.mode.1=Unpackager GT5U.machines.oreprocessor1=§eRunning Mode: GT5U.machines.oreprocessor2=§cTime: %s s GT5U.machines.oreprocessor.void=§eVoid Stone Dust: %s @@ -448,6 +448,7 @@ GT5U.gui.button.voiding_mode_item=§7Void Excess §6Items GT5U.gui.button.voiding_mode_fluid=§7Void Excess §9Fluids GT5U.gui.button.voiding_mode_all=§7Void Excess §6Items §7and §9Fluids GT5U.gui.button.input_separation=Input Separation +GT5U.gui.button.mode_switch=Mode Switch GT5U.gui.button.batch_mode=Batch Mode GT5U.gui.button.lock_recipe=Lock Recipe GT5U.gui.button.down_tier=Down Tier diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_bending.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_bending.png new file mode 100644 index 0000000000..026d49a8b1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_bending.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_chembath.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_chembath.png new file mode 100644 index 0000000000..5b54193005 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_chembath.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_cutting.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_cutting.png new file mode 100644 index 0000000000..85eefe9e95 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_cutting.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_default.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_default.png new file mode 100644 index 0000000000..dff8315e40 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_default.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_forming.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_forming.png new file mode 100644 index 0000000000..28b005fd20 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_forming.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_fluid.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_fluid.png new file mode 100644 index 0000000000..77fcdcf993 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_fluid.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_metal.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_metal.png new file mode 100644 index 0000000000..9b751bd92f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_lpf_metal.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_packager.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_packager.png new file mode 100644 index 0000000000..56abd27f05 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_packager.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_polarizer.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_polarizer.png new file mode 100644 index 0000000000..53a46b0511 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_polarizer.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_separator.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_separator.png new file mode 100644 index 0000000000..c4dc0a21d0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_separator.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_simplewasher.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_simplewasher.png new file mode 100644 index 0000000000..fc94ac64d7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_simplewasher.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_slicing.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_slicing.png new file mode 100644 index 0000000000..5a0dbba939 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_slicing.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_unpackager.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_unpackager.png new file mode 100644 index 0000000000..c1c5753289 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_unpackager.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_washplant.png b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_washplant.png new file mode 100644 index 0000000000..dad4485df3 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/overlay_button/machine_mode_washplant.png differ -- cgit