Skip to content

Commit

Permalink
Update hot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thebrumby authored Sep 15, 2024
1 parent 08d8903 commit 66ec5ab
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions games/hot.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,14 @@ def full_claim(self):
matches = re.findall(r'(\d+)([hm])', wait_time_text)
remaining_wait_time = (sum(int(value) * (60 if unit == 'h' else 1) for value, unit in matches))
remaining_wait_time = self.apply_random_offset(remaining_wait_time)
if remaining_wait_time < 5 or self.settings["forceClaim"]:
# Determine the dynamic threshold
if self.settings['lowestClaimOffset'] < 0:
threshold = abs(self.settings['lowestClaimOffset'])
else:
threshold = 5 # Default threshold
if remaining_wait_time < threshold or self.settings["forceClaim"]:
self.settings['forceClaim'] = True
self.output(f"Step {self.step} - the remaining time to claim is less than the random offset, so applying: settings['forceClaim'] = True", 3)
self.output(f"Step {self.step} - the remaining time to claim is less than the minimum offset, so applying: settings['forceClaim'] = True", 3)
else:
self.output(f"STATUS: Considering {wait_time_text}, we'll go back to sleep for {remaining_wait_time} minutes.", 1)
return remaining_wait_time
Expand Down Expand Up @@ -292,4 +297,4 @@ def main():
claimer.run()

if __name__ == "__main__":
main()
main()

0 comments on commit 66ec5ab

Please sign in to comment.