summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-07-28 10:00:59 +0200
committerGitHub <noreply@github.com>2024-07-28 10:00:59 +0200
commitb2082d1d6008d943ffa2269cbdddb1b4fc72b8ce (patch)
tree26806bedd65409c2a00b2ad6fef18ed4dd2dee29 /src/main/java/at/hannibal2/skyhanni/features/misc
parenta4ba470eabdea05c3e2770ce56cd3ec9e0687efc (diff)
downloadskyhanni-b2082d1d6008d943ffa2269cbdddb1b4fc72b8ce.tar.gz
skyhanni-b2082d1d6008d943ffa2269cbdddb1b4fc72b8ce.tar.bz2
skyhanni-b2082d1d6008d943ffa2269cbdddb1b4fc72b8ce.zip
Backend: Change colour (UK) to color (US) (#2258)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/PartyMemberOutlines.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/items/enchants/Enchant.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt20
4 files changed, 17 insertions, 17 deletions
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<Enchant> {
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<Enchant> {
}
// 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)