diff options
| author | Jade Herd <toxicaven@disroot.org> | 2025-10-14 11:20:47 -0400 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-10-15 00:06:47 +0200 |
| commit | df3338b3b8a542226fd5bd0aa2a5fe88ab87a37b (patch) | |
| tree | 4412b3dda4d715c3b3e1adca7e48e4bf8ffa1528 /src/main/kotlin | |
| parent | f6c0f4ca1573b8b0daa3fb4fb00e927f97f5f45c (diff) | |
| download | Firmament-df3338b3b8a542226fd5bd0aa2a5fe88ab87a37b.tar.gz Firmament-df3338b3b8a542226fd5bd0aa2a5fe88ab87a37b.tar.bz2 Firmament-df3338b3b8a542226fd5bd0aa2a5fe88ab87a37b.zip | |
feat: Pickaxe ability cooldown customization
Signed-off-by: Jade Herd <toxicaven@disroot.org>
Diffstat (limited to 'src/main/kotlin')
| -rw-r--r-- | src/main/kotlin/features/mining/PickaxeAbility.kt | 5 | ||||
| -rw-r--r-- | src/main/kotlin/util/render/RenderCircleProgress.kt | 4 |
2 files changed, 7 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 ) } } |
