Monitor threats independently of active jobs

This commit is contained in:
Tanner committed 2026-11-10 22:12:56 +00:00
1 parent f799a9ea47
commit 038fc503f0
4 files changed
+320 -8

No files matched your search

+5 -2
View File
@@ -347,10 +347,13 @@ class JobStates(LegacyJobStates):
def loiter(self):
self.sleep_with_bed_states.silent = True
return [self.check_threats_states, self.sleep_with_bed_states,
self.eat_food_states]
return [self.sleep_with_bed_states, self.eat_food_states]
def stop(self):
monitor = self.g.get('threat_monitor')
if (monitor is not None and
not getattr(monitor, 'suspending_job', False)):
monitor.cancel_resume()
if self.g.get('breaking'):
self.g.game.cancel_break()
if self.g.get('window'):