From 44f14c48a096a1cb3a50dc87f4b7e2a7557c6784 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sat, 9 Nov 2024 00:11:51 +0100 Subject: Fix: slot unbinding not working unless lock slot and bind slot use the same keybinding --- src/main/kotlin/features/inventory/SlotLocking.kt | 5 +++++ 1 file changed, 5 insertions(+) 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 + } } } -- cgit