From f290d5285cb92dd427726cdc203156187690f068 Mon Sep 17 00:00:00 2001 From: Appability Date: Sun, 13 Nov 2022 23:32:10 -0800 Subject: fix trapper, add cd --- src/main/kotlin/com/ambientaddons/features/dungeon/AutoBuyChest.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon') diff --git a/src/main/kotlin/com/ambientaddons/features/dungeon/AutoBuyChest.kt b/src/main/kotlin/com/ambientaddons/features/dungeon/AutoBuyChest.kt index f1cd74f..d2790b4 100644 --- a/src/main/kotlin/com/ambientaddons/features/dungeon/AutoBuyChest.kt +++ b/src/main/kotlin/com/ambientaddons/features/dungeon/AutoBuyChest.kt @@ -37,10 +37,11 @@ object AutoBuyChest { fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { if (SBLocation.area != Area.Dungeon || rewardChest == null) return if (event.slotId == BUY_SLOT_INDEX) { - hasOpenedChest = true - if (rewardChest == RewardChest.Wood) { + if (rewardChest == RewardChest.Wood && hasOpenedChest) { UChat.chat("§cBlocked purchase! You already opened a chest this run.".withModPrefix()) event.isCanceled = true + } else { + hasOpenedChest = true } } else if (event.slotId == KISMET_SLOT_INDEX) { if (config.blockLowReroll && rewardChest != RewardChest.Bedrock && (rewardChest != RewardChest.Obsidian || SBLocation.dungeonFloor.toString() != "M4")) { -- cgit