From b2082d1d6008d943ffa2269cbdddb1b4fc72b8ce Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Sun, 28 Jul 2024 10:00:59 +0200 Subject: Backend: Change colour (UK) to color (US) (#2258) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/misc/MarkedPlayerManager.kt | 4 ++-- .../skyhanni/features/misc/PartyMemberOutlines.kt | 4 ++-- .../skyhanni/features/misc/items/enchants/Enchant.kt | 6 +++--- .../features/misc/visualwords/VisualWordGui.kt | 20 ++++++++++---------- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc') diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt index e463549bc..05b1eaf35 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt @@ -63,7 +63,7 @@ object MarkedPlayerManager { } } - private fun refreshColours() = + private fun refreshColors() = markedPlayers.forEach { it.value.setColor() } @@ -104,7 +104,7 @@ object MarkedPlayerManager { playerNamesToMark.remove(name) } } - config.entityColor.onToggle(::refreshColours) + config.entityColor.onToggle(::refreshColors) } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt index af2221a55..0d1f96d13 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.SpecialColour +import at.hannibal2.skyhanni.utils.SpecialColor import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.entity.Entity import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -30,6 +30,6 @@ object PartyMemberOutlines { private fun getEntityOutlineColor(entity: Entity): Int? { if (entity !is EntityOtherPlayerMP || !PartyAPI.partyMembers.contains(entity.name)) return null - return SpecialColour.specialToChromaRGB(config.outlineColor) + return SpecialColor.specialToChromaRGB(config.outlineColor) } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Enchant.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Enchant.kt index d010198dd..697a58ebb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Enchant.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Enchant.kt @@ -29,7 +29,7 @@ open class Enchant : Comparable { val config = SkyHanniMod.feature.inventory.enchantParsing // TODO change color to string (support for bold) - val colour = when { + val color = when { level >= maxLevel -> config.perfectEnchantColor level > goodLevel -> config.greatEnchantColor level == goodLevel -> config.goodEnchantColor @@ -37,8 +37,8 @@ open class Enchant : Comparable { } // TODO when chroma is disabled maybe use the neu chroma style instead of gold - if (colour.get() == LorenzColor.CHROMA && !(ChromaManager.config.enabled.get() || EnchantParser.isSbaLoaded)) return "§6§l" - return colour.get().getChatColor() + if (color.get() == LorenzColor.CHROMA && !(ChromaManager.config.enabled.get() || EnchantParser.isSbaLoaded)) return "§6§l" + return color.get().getChatColor() } override fun toString() = "$nbtName $goodLevel $maxLevel\n" diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt index 9cc4f8e34..b8de2eca6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt @@ -112,8 +112,8 @@ open class VisualWordGui : GuiScreen() { val y = guiTop + 170 drawUnmodifiedStringCentered("§aAdd New", x, y) - val colour = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB - drawRect(x - 30, y - 10, x + 30, y + 10, colour) + val color = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB + drawRect(x - 30, y - 10, x + 30, y + 10, color) if (shouldDrawImport) { val importX = guiLeft + sizeX - 45 @@ -250,12 +250,12 @@ open class VisualWordGui : GuiScreen() { var x = guiLeft + 180 var y = guiTop + 140 drawUnmodifiedStringCentered("§cDelete", x, y) - var colour = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB - drawRect(x - 30, y - 10, x + 30, y + 10, colour) + var color = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB + drawRect(x - 30, y - 10, x + 30, y + 10, color) y += 30 drawUnmodifiedStringCentered("§eBack", x, y) - colour = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB - drawRect(x - 30, y - 10, x + 30, y + 10, colour) + color = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB + drawRect(x - 30, y - 10, x + 30, y + 10, color) if (currentIndex < modifiedWords.size && currentIndex != -1) { val currentPhrase = modifiedWords[currentIndex] @@ -264,15 +264,15 @@ open class VisualWordGui : GuiScreen() { drawUnmodifiedStringCentered("§bReplacement Enabled", x, y - 20) var status = if (currentPhrase.enabled) "§2Enabled" else "§4Disabled" drawUnmodifiedStringCentered(status, x, y) - colour = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB - drawRect(x - 30, y - 10, x + 30, y + 10, colour) + color = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB + drawRect(x - 30, y - 10, x + 30, y + 10, color) x += 200 drawUnmodifiedStringCentered("§bCase Sensitive", x, y - 20) status = if (!currentPhrase.isCaseSensitive()) "§2True" else "§4False" drawUnmodifiedStringCentered(status, x, y) - colour = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB - drawRect(x - 30, y - 10, x + 30, y + 10, colour) + color = if (isPointInMousePos(x - 30, y - 10, 60, 20)) colorA else colorB + drawRect(x - 30, y - 10, x + 30, y + 10, color) drawUnmodifiedString("§bIs replaced by:", guiLeft + 30, guiTop + 75) -- cgit