aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-09 00:11:51 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-10 23:45:24 +0100
commit44f14c48a096a1cb3a50dc87f4b7e2a7557c6784 (patch)
tree6a13e5ace400154e3efd642c6c4a615ba38f7710 /src
parent09d0bfc46116f749adef009b3550ef0e20a2faed (diff)
downloadFirmament-44f14c48a096a1cb3a50dc87f4b7e2a7557c6784.tar.gz
Firmament-44f14c48a096a1cb3a50dc87f4b7e2a7557c6784.tar.bz2
Firmament-44f14c48a096a1cb3a50dc87f4b7e2a7557c6784.zip
Fix: slot unbinding not working unless lock slot and bind slot use the same keybinding
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/features/inventory/SlotLocking.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/kotlin/features/inventory/SlotLocking.kt b/src/main/kotlin/features/inventory/SlotLocking.kt
index de54005..4499acd 100644
--- a/src/main/kotlin/features/inventory/SlotLocking.kt
+++ b/src/main/kotlin/features/inventory/SlotLocking.kt
@@ -211,6 +211,11 @@ object SlotLocking : FirmamentFeature {
}
if (it.matches(TConfig.slotBind)) {
storedLockingSlot = null
+ val boundSlots = DConfig.data?.boundSlots ?: return
+ if (slot != null)
+ boundSlots.entries.removeIf {
+ it.value == slot.index || it.key == slot.index
+ }
}
}