aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/features')
-rw-r--r--src/main/kotlin/features/items/EtherwarpOverlay.kt1
-rw-r--r--src/main/kotlin/features/macros/KeyComboTrie.kt4
-rw-r--r--src/main/kotlin/features/macros/MacroUI.kt2
-rw-r--r--src/main/kotlin/features/macros/RadialMenu.kt4
4 files changed, 6 insertions, 5 deletions
diff --git a/src/main/kotlin/features/items/EtherwarpOverlay.kt b/src/main/kotlin/features/items/EtherwarpOverlay.kt
index 622ab4a..8893339 100644
--- a/src/main/kotlin/features/items/EtherwarpOverlay.kt
+++ b/src/main/kotlin/features/items/EtherwarpOverlay.kt
@@ -71,6 +71,7 @@ object EtherwarpOverlay : FirmamentFeature {
BlockTags.DOORS,
BlockTags.TRAPDOORS,
BlockTags.ANVIL,
+ BlockTags.FENCE_GATES,
)
)
diff --git a/src/main/kotlin/features/macros/KeyComboTrie.kt b/src/main/kotlin/features/macros/KeyComboTrie.kt
index 452bc56..48ec57c 100644
--- a/src/main/kotlin/features/macros/KeyComboTrie.kt
+++ b/src/main/kotlin/features/macros/KeyComboTrie.kt
@@ -46,14 +46,14 @@ sealed interface KeyComboTrie {
@Serializable
data class MacroWheel(
- val key: SavedKeyBinding,
+ val keyBinding: SavedKeyBinding = SavedKeyBinding.unbound(),
val options: List<HotkeyAction>
)
@Serializable
data class ComboKeyAction(
val action: HotkeyAction,
- val keys: List<SavedKeyBinding>,
+ val keySequence: List<SavedKeyBinding> = listOf(),
)
data class Leaf(val action: HotkeyAction) : KeyComboTrie {
diff --git a/src/main/kotlin/features/macros/MacroUI.kt b/src/main/kotlin/features/macros/MacroUI.kt
index 5a7d406..09390fe 100644
--- a/src/main/kotlin/features/macros/MacroUI.kt
+++ b/src/main/kotlin/features/macros/MacroUI.kt
@@ -143,7 +143,7 @@ class MacroUI {
inner class Wheels {
@field:Bind("wheels")
val wheels: ObservableList<Wheel> = MacroData.DConfig.data.wheels.mapTo(ObservableList(mutableListOf())) {
- Wheel(this, it.key, it.options.map { CommandAction((it as CommandAction).command) })
+ Wheel(this, it.keyBinding, it.options.map { CommandAction((it as CommandAction).command) })
}
@Bind
diff --git a/src/main/kotlin/features/macros/RadialMenu.kt b/src/main/kotlin/features/macros/RadialMenu.kt
index 5134994..3496d43 100644
--- a/src/main/kotlin/features/macros/RadialMenu.kt
+++ b/src/main/kotlin/features/macros/RadialMenu.kt
@@ -127,7 +127,7 @@ object RadialMacros {
fun onOpen(event: WorldKeyboardEvent) {
if (RadialMenuViewer.activeMenu != null) return
wheels.forEach { wheel ->
- if (event.matches(wheel.key, atLeast = true)) {
+ if (event.matches(wheel.keyBinding, atLeast = true)) {
class R(val action: HotkeyAction) : RadialMenuOption {
override val isEnabled: Boolean
get() = true
@@ -142,7 +142,7 @@ object RadialMacros {
}
RadialMenuViewer.activeMenu = object : RadialMenu {
override val key: SavedKeyBinding
- get() = wheel.key
+ get() = wheel.keyBinding
override val options: List<RadialMenuOption> =
wheel.options.map { R(it) }
}