Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
KingContaria committed Aug 20, 2024
2 parents d89ea79 + 78d4cb3 commit 8e3a6d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ public boolean isCooldownReady() {
return System.currentTimeMillis() - this.cooldownStart >= SeedQueue.config.resetCooldown;
}

public void resetCooldown() {
this.cooldownStart = Long.MAX_VALUE;
}

public boolean canReset(boolean ignoreLock, boolean ignoreResetCooldown) {
return this.hasPreviewRendered() && (!this.seedQueueEntry.isLocked() || ignoreLock) && (this.isCooldownReady() || ignoreResetCooldown) && SeedQueue.selectedEntry != this.seedQueueEntry;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ private void updateMainPreviews() {
}
if (this.mainPreviews[i] == null && !this.blockedMainPositions.contains(i)) {
this.mainPreviews[i] = this.preparingPreviews.remove(0);
this.mainPreviews[i].resetCooldown();

if (this.mainPreviews[i].getSeedQueueEntry().mainPosition != -1) {
SeedQueue.LOGGER.warn("Main preview {} already assigned a position", i);
Expand Down

0 comments on commit 8e3a6d3

Please sign in to comment.