Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ILike2WatchMemes committed Jul 5, 2024
1 parent 939b868 commit c5a7952
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ object ExperimentsDryStreakDisplay {

@SubscribeEvent
fun onInventoryClose(event: InventoryCloseEvent) {
if (didJustFind || InventoryUtils.getCurrentExperiment() != null) return
if (didJustFind || InventoryUtils.getCurrentExperiment() == null) return

val storage = storage ?: return
storage.attemptsSince += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,6 @@ object ExperimentsProfitTracker {
}

val addToTracker = lastExperimentTime.passedSince() <= 3.seconds
for (item in InventoryUtils.getItemsInOwnInventory()) {
val internalName = item.getInternalNameOrNull() ?: continue
if (internalName.asString() !in listOf("EXP_BOTTLE", "GRAND_EXP_BOTTLE", "TITANIC_EXP_BOTTLE")) continue
currentBottlesInInventory.addOrPut(internalName, item.stackSize)
}
handleExpBottles(addToTracker)
}

Expand All @@ -214,6 +209,7 @@ object ExperimentsProfitTracker {
}
if (inExperimentationTable) {
lastExperimentTime = SimpleTimeMark.now()
handleExpBottles(true)
inExperimentationTable = false
}
}
Expand Down Expand Up @@ -262,6 +258,11 @@ object ExperimentsProfitTracker {
}

private fun handleExpBottles(addToTracker: Boolean) {
for (item in InventoryUtils.getItemsInOwnInventory()) {
val internalName = item.getInternalNameOrNull() ?: continue
if (internalName.asString() !in listOf("EXP_BOTTLE", "GRAND_EXP_BOTTLE", "TITANIC_EXP_BOTTLE")) continue
currentBottlesInInventory.addOrPut(internalName, item.stackSize)
}
for (bottleType in currentBottlesInInventory) {
val internalName = bottleType.key
val amount = bottleType.value
Expand Down

0 comments on commit c5a7952

Please sign in to comment.