diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java | 9 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt | 23 |
2 files changed, 31 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java index 757e5495b..fc7bac1e1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -20,7 +20,7 @@ public class MiscConfig { @ConfigOption(name = "Hide Armor", desc = "") @Accordion @Expose - // TOOD maybe we can migrate this already + // TODO maybe we can migrate this already public HideArmorConfig hideArmor2 = new HideArmorConfig(); @Expose @@ -113,6 +113,7 @@ public class MiscConfig { @FeatureToggle public boolean brewingStandOverlay = true; + // TODO move into scoreboard accordion @Expose @ConfigOption(name = "Red Scoreboard Numbers", desc = "Hide the red scoreboard numbers on the right side of the screen.") @ConfigEditorBoolean @@ -126,6 +127,12 @@ public class MiscConfig { public boolean hidePiggyScoreboard = true; @Expose + @ConfigOption(name = "Color Month Names", desc = "Color the month names in the Scoreboard.") + @ConfigEditorBoolean + @FeatureToggle + public boolean colorMonthNames = false; + + @Expose @ConfigOption(name = "Explosions Hider", desc = "Hide explosions.") @ConfigEditorBoolean @FeatureToggle diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt index 896313d12..6399c3e2b 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt +++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/GuiIngameHook.kt @@ -51,5 +51,28 @@ private fun replaceString(text: String): String? { } } + if (SkyHanniMod.feature.misc.colorMonthNames) { + for (season in Season.entries) { + if (text.trim().startsWith(season.prefix)) { + return season.colorCode + text + } + } + } + return text } + +enum class Season(val prefix: String, val colorCode: String) { + EARLY_SPRING("Early Spring", "§d"), + SPRING("Spring", "§d"), + LATE_SPRING("Late Spring", "§d"), + EARLY_SUMMER("Early Summer", "§6"), + SUMMER("Summer", "§6"), + LATE_SUMMER("Late Summer", "§6"), + EARLY_AUTUMN("Early Autumn", "§e"), + AUTUMN("Autumn", "§e"), + LATE_AUTUMN("Late Autumn", "§e"), + EARLY_WINTER("Early Winter", "§9"), + WINTER("Winter", "§9"), + LATE_WINTER("Late Winter", "§9") +} |