diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-09-06 17:59:36 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-09-06 17:59:36 +0200 |
| commit | aa7a92e95d97a4b428ff685c6bdf1ab5fd3b3268 (patch) | |
| tree | 8bb692cd1ecde1f425cba7773816b9d8066bada0 | |
| parent | 67da8fd538070bcb652538741fcfe89252173abe (diff) | |
| download | Firmament-aa7a92e95d97a4b428ff685c6bdf1ab5fd3b3268.tar.gz Firmament-aa7a92e95d97a4b428ff685c6bdf1ab5fd3b3268.tar.bz2 Firmament-aa7a92e95d97a4b428ff685c6bdf1ab5fd3b3268.zip | |
chore: add h+ cape
| -rw-r--r-- | src/main/kotlin/features/macros/KeyComboTrie.kt | 10 | ||||
| -rw-r--r-- | src/main/kotlin/features/macros/MacroUI.kt | 2 | ||||
| -rw-r--r-- | src/main/kotlin/features/misc/CustomCapes.kt | 7 | ||||
| -rw-r--r-- | src/main/kotlin/features/misc/Devs.kt | 3 | ||||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/cape/REUSE.toml | 5 | ||||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/cape/h_plus.png | bin | 0 -> 686 bytes |
6 files changed, 20 insertions, 7 deletions
diff --git a/src/main/kotlin/features/macros/KeyComboTrie.kt b/src/main/kotlin/features/macros/KeyComboTrie.kt index 48ec57c..1983b2e 100644 --- a/src/main/kotlin/features/macros/KeyComboTrie.kt +++ b/src/main/kotlin/features/macros/KeyComboTrie.kt @@ -15,15 +15,15 @@ sealed interface KeyComboTrie { val root = Branch(mutableMapOf()) for (combo in combos) { var p = root - if (combo.keys.isEmpty()) { + if (combo.keySequence.isEmpty()) { ErrorUtil.softUserError("Key Combo for ${combo.action.label.string} is empty") continue } - for ((index, key) in combo.keys.withIndex()) { + for ((index, key) in combo.keySequence.withIndex()) { val m = (p.nodes as MutableMap) - if (index == combo.keys.lastIndex) { + if (index == combo.keySequence.lastIndex) { if (key in m) { - ErrorUtil.softUserError("Overlapping actions found for ${combo.keys.joinToString(" > ")} (another action ${m[key]} already exists).") + ErrorUtil.softUserError("Overlapping actions found for ${combo.keySequence.joinToString(" > ")} (another action ${m[key]} already exists).") break } @@ -31,7 +31,7 @@ sealed interface KeyComboTrie { } else { val c = m.getOrPut(key) { Branch(mutableMapOf()) } if (c !is Branch) { - ErrorUtil.softUserError("Overlapping actions found for ${combo.keys} (final node exists at index $index) through another action already") + ErrorUtil.softUserError("Overlapping actions found for ${combo.keySequence} (final node exists at index $index) through another action already") break } else { p = c diff --git a/src/main/kotlin/features/macros/MacroUI.kt b/src/main/kotlin/features/macros/MacroUI.kt index 09390fe..869466d 100644 --- a/src/main/kotlin/features/macros/MacroUI.kt +++ b/src/main/kotlin/features/macros/MacroUI.kt @@ -255,7 +255,7 @@ class MacroUI { fun commandR() = StructuredText.of(command) @field:Bind("combo") - val combo = action.keys.map { KeyBindingEditor(it, this) }.toObservableList() + val combo = action.keySequence.map { KeyBindingEditor(it, this) }.toObservableList() @Bind fun formattedCombo() = diff --git a/src/main/kotlin/features/misc/CustomCapes.kt b/src/main/kotlin/features/misc/CustomCapes.kt index 77a5c2d..a5bc52a 100644 --- a/src/main/kotlin/features/misc/CustomCapes.kt +++ b/src/main/kotlin/features/misc/CustomCapes.kt @@ -133,7 +133,11 @@ object CustomCapes : FirmamentFeature { FIRMAMENT_STATIC( "Firmament", TexturedCapeRenderer(Firmament.identifier("textures/cape/firm_static.png")) - ) + ), + HYPIXEL_PLUS( + "Hypixel+", + TexturedCapeRenderer(Firmament.identifier("textures/cape/h_plus.png")) + ), ; val cape = CustomCape(name, label, render) @@ -146,6 +150,7 @@ object CustomCapes : FirmamentFeature { Devs.nea to AllCapes.UNPLEASANT_GRADIENT, Devs.kath to AllCapes.FIRMAMENT_STATIC, Devs.jani to AllCapes.FIRMAMENT_ANIMATED, + Devs.HPlus.ic22487 to AllCapes.HYPIXEL_PLUS, ), Devs.FurfSky.all.map { it to AllCapes.FURFSKY_STATIC }, ).flatten().flatMap { (dev, cape) -> dev.uuids.map { it to cape.cape } }.toMap() diff --git a/src/main/kotlin/features/misc/Devs.kt b/src/main/kotlin/features/misc/Devs.kt index 1f16400..91095c0 100644 --- a/src/main/kotlin/features/misc/Devs.kt +++ b/src/main/kotlin/features/misc/Devs.kt @@ -34,5 +34,8 @@ object Devs { persuasiveViksy ) } + object HPlus { + val ic22487 = Dev("ab2be3b2-bb75-4aaa-892d-9fff5a7e3953") + } } diff --git a/src/main/resources/assets/firmament/textures/cape/REUSE.toml b/src/main/resources/assets/firmament/textures/cape/REUSE.toml index ba721f7..20cefca 100644 --- a/src/main/resources/assets/firmament/textures/cape/REUSE.toml +++ b/src/main/resources/assets/firmament/textures/cape/REUSE.toml @@ -17,3 +17,8 @@ SPDX-FileCopyrightText = ["ic22487", "kathund"] path = ["fsr_static.png"] SPDX-License-Identifier = "CC-BY-4.0" SPDX-FileCopyrightText = ["Tendan"] + +[[annotations]] +path = ["h_plus.png"] +SPDX-License-Identifier = "CC-BY-4.0" +SPDX-FileCopyrightText = ["ic22487"] diff --git a/src/main/resources/assets/firmament/textures/cape/h_plus.png b/src/main/resources/assets/firmament/textures/cape/h_plus.png Binary files differnew file mode 100644 index 0000000..974bef7 --- /dev/null +++ b/src/main/resources/assets/firmament/textures/cape/h_plus.png |
