From 66ec5ab1adca43cb9a003c8d24344f2e557634c6 Mon Sep 17 00:00:00 2001 From: thebrumby Date: Sun, 15 Sep 2024 12:47:40 +0100 Subject: [PATCH] Update hot.py --- games/hot.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/games/hot.py b/games/hot.py index fd7aa5f..bcf5747 100644 --- a/games/hot.py +++ b/games/hot.py @@ -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 @@ -292,4 +297,4 @@ def main(): claimer.run() if __name__ == "__main__": - main() \ No newline at end of file + main()