diff options
| -rw-r--r-- | src/main/kotlin/features/mining/PickaxeAbility.kt | 5 | ||||
| -rw-r--r-- | src/main/kotlin/util/render/RenderCircleProgress.kt | 4 | ||||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/gui/circle.png | bin | 340 -> 362 bytes | |||
| -rw-r--r-- | translations/en_us.json | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/src/main/kotlin/features/mining/PickaxeAbility.kt b/src/main/kotlin/features/mining/PickaxeAbility.kt index 5bd85c5..862d979 100644 --- a/src/main/kotlin/features/mining/PickaxeAbility.kt +++ b/src/main/kotlin/features/mining/PickaxeAbility.kt @@ -1,5 +1,6 @@ package moe.nea.firmament.features.mining +import io.github.notenoughupdates.moulconfig.ChromaColour import java.util.regex.Pattern import kotlin.jvm.optionals.getOrNull import kotlin.time.Duration @@ -68,6 +69,7 @@ object PickaxeAbility { val disableInDungeons by toggle("disable-in-dungeons") { true } val showOnTools by choice("show-on-tools") { ShowOnTools.PICKAXES_AND_DRILLS } val cooldownScale by integer("ability-scale", 16, 64) { 16 } + val cooldownColour by colour("ability-colour") { ChromaColour.fromStaticRGB(187, 54, 44, 128) } val cooldownReadyToast by toggle("ability-cooldown-toast") { false } val drillFuelBar by toggle("fuel-bar") { true } val blockOnPrivateIsland by choice( @@ -262,7 +264,8 @@ object PickaxeAbility { RenderCircleProgress.renderCircle( event.context, Identifier.of("firmament", "textures/gui/circle.png"), getCooldownPercentage(ability.name, ability.cooldown).toFloat(), - 0f, 1f, 0f, 1f + 0f, 1f, 0f, 1f, + color = TConfig.cooldownColour.getEffectiveColourRGB() ) event.context.matrices.popMatrix() } diff --git a/src/main/kotlin/util/render/RenderCircleProgress.kt b/src/main/kotlin/util/render/RenderCircleProgress.kt index 7ea4ca8..c9b8e16 100644 --- a/src/main/kotlin/util/render/RenderCircleProgress.kt +++ b/src/main/kotlin/util/render/RenderCircleProgress.kt @@ -153,12 +153,14 @@ object RenderCircleProgress { u2: Float, v1: Float, v2: Float, + color: Int = -1 ) { renderCircularSlice( drawContext, CustomRenderLayers.GUI_TEXTURED_NO_DEPTH_TRIS.apply(texture), u1, u2, v1, v2, - (-τ / 4).toFloat()..(progress * τ - τ / 4).toFloat() + (-τ / 4).toFloat()..(progress * τ - τ / 4).toFloat(), + color = color ) } } diff --git a/src/main/resources/assets/firmament/textures/gui/circle.png b/src/main/resources/assets/firmament/textures/gui/circle.png Binary files differindex ffd3fab..b5021f8 100644 --- a/src/main/resources/assets/firmament/textures/gui/circle.png +++ b/src/main/resources/assets/firmament/textures/gui/circle.png diff --git a/translations/en_us.json b/translations/en_us.json index 5d5efbf..02f6943 100644 --- a/translations/en_us.json +++ b/translations/en_us.json @@ -260,6 +260,8 @@ "firmament.config.pickaxe-info.ability-cooldown.description": "Show a cooldown on your cross-hair for your pickaxe ability.", "firmament.config.pickaxe-info.ability-scale": "Ability Cooldown Scale", "firmament.config.pickaxe-info.ability-scale.description": "Resize the cooldown around your cross-hair for your pickaxe ability.", + "firmament.config.pickaxe-info.ability-colour": "Ability Cooldown Colour", + "firmament.config.pickaxe-info.ability-colour.description": "Color of the cooldown indicator around the cross-hair.", "firmament.config.pickaxe-info.block-on-dynamic": "Block on Private Island", "firmament.config.pickaxe-info.block-on-dynamic.choice.always": "Always Block", "firmament.config.pickaxe-info.block-on-dynamic.choice.never": "Never Block", |
