diff options
author | Mary <33456283+FourIsTheNumber@users.noreply.github.com> | 2024-07-24 21:14:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 08:14:45 +0700 |
commit | 5045736c2df49b6214c63dc78edff258ed39de0e (patch) | |
tree | d8bd169866706365a7b832756ca737d60450bbc0 /src/main/java/gregtech/api/interfaces | |
parent | e53b6c05521f399312502c21bd29bd0f0479aa8b (diff) | |
download | GT5-Unofficial-5045736c2df49b6214c63dc78edff258ed39de0e.tar.gz GT5-Unofficial-5045736c2df49b6214c63dc78edff258ed39de0e.tar.bz2 GT5-Unofficial-5045736c2df49b6214c63dc78edff258ed39de0e.zip |
Update multi-machines to display running mode in GUI (#2755)
* Framework for mode text in gui
* Add getMachineModeName to all multimachines
* Changed lang file for MFE because "Electromagnetic Polarizer" and "Electromagnetic Separator" are too long and make the GUI look bad
* Removed leftover code
* Removed more leftover code... oops
* Moved logic to base class and made mode switch chat message localizable
* Merge caused spotless to fail, I guess
* Reverted logic from parent class
* ahhhh spotless
Diffstat (limited to 'src/main/java/gregtech/api/interfaces')
-rw-r--r-- | src/main/java/gregtech/api/interfaces/modularui/ControllerWithOptionalFeatures.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/interfaces/modularui/ControllerWithOptionalFeatures.java b/src/main/java/gregtech/api/interfaces/modularui/ControllerWithOptionalFeatures.java index a877492907..67e6a72776 100644 --- a/src/main/java/gregtech/api/interfaces/modularui/ControllerWithOptionalFeatures.java +++ b/src/main/java/gregtech/api/interfaces/modularui/ControllerWithOptionalFeatures.java @@ -133,6 +133,13 @@ public interface ControllerWithOptionalFeatures extends IVoidable, IRecipeLockab } /** + * @return name for the current machine mode on this machine. Defaults "Unknown Mode" + */ + default String getMachineModeName() { + return "Unknown Mode"; + } + + /** * @param index Index of machineModeIcons to pull from * @return UITexture associated with that machineMode */ @@ -161,6 +168,9 @@ public interface ControllerWithOptionalFeatures extends IVoidable, IRecipeLockab Pos2d getMachineModeSwitchButtonPos(); + /** + * Called when the mode switch button is clicked + */ default void onMachineModeSwitchClick() {} default ButtonWidget createModeSwitchButton(IWidgetBuilder<?> builder) { |