aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/features/dungeon
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/features/dungeon')
-rw-r--r--src/main/kotlin/com/ambientaddons/features/dungeon/AutoBuyChest.kt5
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")) {