diff options
| -rw-r--r-- | src/main/kotlin/features/inventory/SlotLocking.kt | 3 | ||||
| -rw-r--r-- | translations/en_us.json | 2 |
2 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 eefc6d1..0be9411 100644 --- a/src/main/kotlin/features/inventory/SlotLocking.kt +++ b/src/main/kotlin/features/inventory/SlotLocking.kt @@ -137,6 +137,7 @@ object SlotLocking : FirmamentFeature { val slotBind by keyBinding("bind") { GLFW.GLFW_KEY_L } val slotBindRequireShift by toggle("require-quick-move") { true } val slotRenderLines by choice("bind-render") { SlotRenderLinesMode.ONLY_BOXES } + val slotBindOnlyInInv by toggle("bind-only-in-inv") { false } val allowMultiBinding by toggle("multi-bind") { true } // TODO: filter based on this option val protectAllHuntingBoxes by toggle("hunting-box") { false } val allowDroppingInDungeons by toggle("drop-in-dungeons") { true } @@ -269,6 +270,8 @@ object SlotLocking : FirmamentFeature { it.actionType == SlotActionType.QUICK_MOVE || (it.actionType == SlotActionType.PICKUP && !TConfig.slotBindRequireShift) if (!isValidAction) return val handler = MC.handledScreen?.screenHandler ?: return + if (TConfig.slotBindOnlyInInv && handler.slots.any { it.inventory !is PlayerInventory }) + return val slot = it.slot if (slot != null && it.slot.inventory is PlayerInventory) { val matchingSlots = boundSlots.findMatchingSlots(slot.index) diff --git a/translations/en_us.json b/translations/en_us.json index feea7fc..56baae9 100644 --- a/translations/en_us.json +++ b/translations/en_us.json @@ -363,6 +363,8 @@ "firmament.config.save-cursor-position.tolerance.description": "Select how long your cursor position last between GUIs before resetting back to the middle of the screen.", "firmament.config.slot-locking": "Slot Locking", "firmament.config.slot-locking.bind": "Bind Slot", + "firmament.config.slot-locking.bind-only-in-inv": "Bind Only in Inventory", + "firmament.config.slot-locking.bind-only-in-inv.description": "Only allow using slot binds in the player inventory, not in chests, etc.", "firmament.config.slot-locking.bind-render": "Show Slot Bindings", "firmament.config.slot-locking.bind-render.choice.everything": "Always", "firmament.config.slot-locking.bind-render.choice.nothing": "Only when hovered", |
