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 --- .../gregtech/api/gui/modularui/GT_UITextures.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/main/java/gregtech/api/gui/modularui') diff --git a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java index 54666567db..c39b47e903 100644 --- a/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java +++ b/src/main/java/gregtech/api/gui/modularui/GT_UITextures.java @@ -398,6 +398,36 @@ public class GT_UITextures { public static final UITexture OVERLAY_BUTTON_LIQUIDMODE_OFF = UITexture .fullImage(GregTech.ID, "gui/overlay_button/LiquidMode_off"); + // These icons are for mode switching machine modes + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_DEFAULT = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_default"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_CHEMBATH = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_chembath"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_WASHPLANT = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_washplant"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_SIMPLEWASHER = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_simplewasher"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_PACKAGER = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_packager"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_UNPACKAGER = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_unpackager"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_SEPARATOR = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_separator"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_POLARIZER = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_polarizer"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_LPF_FLUID = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_lpf_fluid"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_LPF_METAL = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_lpf_metal"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_BENDING = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_bending"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_FORMING = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_forming"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_SLICING = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_slicing"); + public static final UITexture OVERLAY_BUTTON_MACHINEMODE_CUTTING = UITexture + .fullImage(GregTech.ID, "gui/overlay_button/machine_mode_cutting"); + /** * Can adjust size as needed. */ -- cgit