diff options
author | Appability <appable@icloud.com> | 2022-11-13 23:32:10 -0800 |
---|---|---|
committer | Appability <appable@icloud.com> | 2022-11-13 23:32:10 -0800 |
commit | f290d5285cb92dd427726cdc203156187690f068 (patch) | |
tree | 7bc4aa967ea009338fb7a78e75a1eefc678d4943 /src/main/kotlin/com/ambientaddons/features/dungeon | |
parent | fbcfd07e27fb2f64787c67244bb58730982ec2c1 (diff) | |
download | AmbientAddons-f290d5285cb92dd427726cdc203156187690f068.tar.gz AmbientAddons-f290d5285cb92dd427726cdc203156187690f068.tar.bz2 AmbientAddons-f290d5285cb92dd427726cdc203156187690f068.zip |
fix trapper, add cd
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon')
-rw-r--r-- | src/main/kotlin/com/ambientaddons/features/dungeon/AutoBuyChest.kt | 5 |
1 files changed, 3 insertions, 2 deletions
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")) { |